/* Modern Registration Page Styles with Theme Colors */
:root {
    /* Theme primary colors - Your brand colors */
    --primary-color: #235649;
    --primary-dark: #1b4238;
    --primary-light: #2e6859;
    --accent-color: #f47543;
    --accent-light: #f69268;
    --accent-dark: #e25a25;
    --gradient-1: #235649;
    --gradient-2: #34806c;
    --gradient-3: #f47543;
    --text-light: #ffffff;
    --text-dark: #333333;
    --border-color: #e0e0e0;
    --background-light: #f8f9fa;
}

.jamaah-registration-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.jamaah-registration-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.jamaah-registration-header:after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

.jamaah-registration-header h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.jamaah-registration-header p {
    color: #666;
    font-size: 16px;
}

.registration-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.registration-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.registration-card-header {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    color: var(--text-light);
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.registration-card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.registration-card-body {
    padding: 20px;
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--border-color);
}

.form-section h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 18px;
    padding-left: 10px;
    border-left: 4px solid var(--accent-color);
}

.form-field-wrapper {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

/* Make fields side by side */
.multi-field-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.multi-field-row .form-field {
    flex: 1;
    min-width: 250px;
}

.form-field {
    padding: 0 10px;
    margin-bottom: 20px;
    flex: 1 0 calc(33.333% - 20px);
    min-width: 250px;
}

/* Full width fields */
.form-field-full {
    flex: 1 0 100% !important;
}

/* Increased height for select boxes */
.custom-select {
    height: 48px !important; /* Increased height */
    padding-top: 0;
    padding-bottom: 0;
    appearance: menulist; /* Shows the dropdown arrow */
}

/* Make sure select options are visible */
select.form-control option {
    padding: 10px;
    font-size: 15px;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-color);
}

.form-field input[type="text"],
.form-field input[type="tel"],
.form-field input[type="email"],
.form-field input[type="date"],
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: var(--background-light);
    transition: border 0.3s ease, box-shadow 0.3s ease;
    font-size: 15px;
}

.form-field textarea {
    min-height: 120px;
    resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(244, 117, 67, 0.2);
}

/* Radio button styling */
.radio-group {
    display: flex;
    gap: 20px;
}

.radio-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.radio-container input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.radio-label {
    position: relative;
    padding-left: 30px;
    margin-right: 15px;
    line-height: 25px;
    font-size: 15px;
    color: var(--text-dark);
}

.radio-label:before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    background: transparent;
}

.radio-container input[type="radio"]:checked + .radio-label:after {
    content: '';
    position: absolute;
    left: 5px;
    top: 7px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-color);
}

.form-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.btn-register {
    background: linear-gradient(to right, var(--accent-color), var(--accent-light));
    color: var(--text-light);
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-register:hover {
    background: linear-gradient(to right, var(--accent-dark), var(--accent-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.btn-reset {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 12px 25px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-reset:hover {
    background-color: rgba(35, 86, 73, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-field {
        flex: 1 0 100%;
    }
    
    .multi-field-row {
        flex-direction: column;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-register, .btn-reset {
        width: 100%;
        justify-content: center;
    }
}

/* Alert/Message Styles */
.alert {
    position: relative;
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    animation: slideDown 0.3s ease-out forwards;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    border-color: rgba(40, 167, 69, 0.2);
    color: #155724;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.2);
    color: #721c24;
}

.alert-icon {
    margin-right: 15px;
    font-size: 24px;
    display: flex;
    align-items: center;
}

.alert-success .alert-icon {
    color: #28a745;
}

.alert-danger .alert-icon {
    color: #dc3545;
}

.alert-message {
    flex: 1;
}

.alert-dismissible {
    padding-right: 50px;
}

.alert-dismissible .close {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 0;
    background-color: transparent;
    border: 0;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.15s;
}

.alert-dismissible .close:hover {
    opacity: 1;
}

.fade {
    opacity: 0;
    transition: opacity 0.15s linear;
}

.fade.show {
    opacity: 1;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Required Field Indicator Styles */
.required-field-notice {
    margin: 0;
    font-size: 14px;
    color: white;
    margin-top: 8px;
    font-weight: 500;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.required-icon {
    color: #ff9a9a;
    font-size: 10px;
    vertical-align: super;
    margin-left: 2px;
}

.form-field label i.required-icon {
    color: #ff9a9a;
    font-size: 8px;
    vertical-align: super;
    margin-left: 4px;
}

.invalid-label {
    color: #dc3545 !important;
}

.invalid-radio .radio-label:before {
    border-color: #dc3545 !important;
}

/* Autocomplete styles */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    pointer-events: none;
}

.ui-autocomplete {
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 9999 !important;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.ui-autocomplete .ui-menu-item {
    padding: 8px 12px;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.ui-autocomplete .ui-menu-item:last-child {
    border-bottom: none;
}

.ui-autocomplete .ui-menu-item:hover,
.ui-autocomplete .ui-menu-item.ui-state-focus {
    background-color: var(--primary-light);
    color: white;
    border-color: var(--primary-light);
    margin: 0;
}

.ui-helper-hidden-accessible {
    display: none;
}

/* Shake animation for invalid fields */
@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

.shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
    transform: translate3d(0, 0, 0);
}

.form-field input.invalid,
.form-field textarea.invalid,
.form-field select.invalid {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
}

.form-field input.invalid:focus,
.form-field textarea.invalid:focus,
.form-field select.invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
}
