﻿﻿ /* Register.css */
.register-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(40px, 8vh, 80px) 0;
    display: flex;
    justify-content: center;
}

.register-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    width: clamp(300px, 90%, 500px);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 50px auto 0 auto; /* Centered with top margin */
}

    .register-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
    }

.card-header {
    background: linear-gradient(135deg, #1a2a6c, #b21f1f);
    padding: clamp(20px, 4vw, 30px);
    text-align: center;
    color: #fff;
}

    .card-header h2 {
        font-size: clamp(1.8rem, 4vw, 2.2rem);
        font-weight: 700;
        margin: 0;
    }

    .card-header p {
        font-size: clamp(0.9rem, 1.5vw, 1rem);
        margin: 5px 0 0;
        opacity: 0.9;
    }

.card-body {
    padding: clamp(20px, 4vw, 40px);
}

.error-summary {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: none;
}

    .error-summary:empty {
        display: none;
    }

.form-group {
    margin-bottom: 25px;
    position: relative;
}

    .form-group label {
        font-size: clamp(0.9rem, 1.5vw, 1rem);
        font-weight: 500;
        color: #1a2a6c;
        display: block;
        margin-bottom: 8px;
    }

.input-wrapper {
    display: flex;
    align-items: center;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.input-icon {
    padding: 10px;
    color: #1a2a6c;
    font-size: 1.2em;
    background: #f9f9f9;
}

.form-group input,
.form-row input {
    width: 100%;
    padding: clamp(8px, 1.5vw, 12px);
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    border: none;
    background: transparent;
    outline: none;
    color: #333;
}

    .form-group input:focus {
        background: #fff;
    }

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

    .form-row .form-group {
        flex: 1;
        min-width: 0;
    }

.validation-message {
    color: #dc3545;
    font-size: 0.85rem;
    /* position: absolute; removed */
    /* top: 100%; removed */
    /* left: 0; removed */
    display: block; /* Ensure it takes its own line */
    margin-top: 5px;
    width: 100%; /* Ensure it doesn't try to float next to anything */
}

.form-check {
    margin-bottom: 30px;
    display: flex;
    /* align-items: center; Removed to allow wrapping and default alignment */
    flex-wrap: wrap; /* Allow items to wrap to the next line */
    gap: 10px;
}

/* Optional: Style for the div wrapping input and label, if more control is needed */
.form-check > div {
    display: flex; /* Keep input and label on the same line */
    align-items: center;
    gap: 10px; /* Maintain gap between checkbox and label */
    /* flex-basis: 100%; /* Optional: if you want it to take full width before validation message */
}

    .form-check .form-check-input { /* Targeting the Bootstrap class */
        width: 20px;
        height: 20px;
        cursor: pointer;
        accent-color: #1a2a6c;
        margin-top: 0.1em; /* Minor adjustment for vertical alignment with label */
    }

    .form-check .form-check-label { /* Targeting the Bootstrap class */
        font-size: clamp(0.9rem, 1.5vw, 1rem);
        color: #555;
        cursor: pointer;
        margin-bottom: 0; /* Remove default bottom margin if any */
        white-space: nowrap; /* Prevent label text from wrapping */
    }

.submit-btn {
    width: 100%;
    padding: clamp(10px, 2vw, 14px);
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    font-weight: 600;
    background: #1a2a6c;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

    .submit-btn:hover {
        background: #b21f1f;
        transform: scale(1.02);
    }

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .register-container {
        padding: 20px 0;
    }

    .register-card {
        width: 90%; /* Adjust width for smaller screens */
        margin-top: 20px;
        margin-bottom: 20px;
    }

    .card-header {
        padding: clamp(15px, 3vw, 25px);
    }

    .card-header h2 {
        font-size: clamp(1.6rem, 3.5vw, 2rem);
    }

    .card-header p {
        font-size: clamp(0.85rem, 1.4vw, 0.95rem);
    }

    .card-body {
        padding: clamp(15px, 3vw, 30px);
    }

    .form-row {
        flex-direction: column; /* Stack form groups in a row */
        gap: 0; /* Remove gap as they will stack */
    }

    .form-row .form-group {
        flex-basis: 100%; /* Make each form group take full width */
        margin-bottom: 20px; /* Add margin between stacked groups */
    }

    .form-row .form-group:last-child {
        margin-bottom: 0; /* Remove margin for the last item in a row */
    }
    
    .form-check .form-check-label {
        white-space: normal; /* Allow label text to wrap */
    }

    .submit-btn {
        padding: clamp(10px, 1.8vw, 12px);
        font-size: clamp(0.95rem, 1.4vw, 1.05rem);
    }
}

@media (max-width: 480px) {
    .register-card {
        width: 95%;
    }

    .card-header h2 {
        font-size: 1.5rem;
    }

    .card-header p {
        font-size: 0.8rem;
    }

    .form-group label,
    .form-group input,
    .form-row input {
        font-size: 0.9rem;
    }

    .form-check .form-check-label {
        font-size: 0.9rem;
    }

    .submit-btn {
        font-size: 1rem;
    }

    .footer-link p, .footer-link a {
        font-size: 0.85rem;
    }
}
