/* Rotary Club Apparel Order Form Styles */
:root {
    --rotary-coral: #f88f69;
    --rotary-black: #000000;
    --rotary-white: #ffffff;
    --rotary-light-coral: #fab49a;
    --rotary-dark-coral: #e67b5a;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px 0;
}

.container {
    max-width: 900px;
}

.form-container {
    background: var(--rotary-white);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    margin: 20px 0;
    border: 2px solid var(--rotary-coral);
}

.rotary-logo {
    max-height: 80px;
    width: auto;
}

.form-title {
    color: var(--rotary-black);
    font-weight: 700;
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.form-description {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.section-header {
    border-left: 4px solid var(--rotary-coral);
    padding-left: 15px;
    margin: 30px 0 20px 0;
    background: linear-gradient(to right, rgba(248, 143, 105, 0.1), transparent);
    padding: 15px;
    border-radius: 0 8px 8px 0;
}

.section-header h3 {
    color: var(--rotary-black);
    font-weight: 600;
    margin: 0;
    font-size: 1.4rem;
}

.section-header i {
    color: var(--rotary-coral);
}

.form-label {
    color: var(--rotary-black);
    font-weight: 500;
    margin-bottom: 8px;
}

.form-label.required::after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--rotary-coral);
    box-shadow: 0 0 0 0.2rem rgba(248, 143, 105, 0.25);
}

.form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-select:focus {
    border-color: var(--rotary-coral);
    box-shadow: 0 0 0 0.2rem rgba(248, 143, 105, 0.25);
}

.btn-rotary {
    background: linear-gradient(135deg, var(--rotary-coral) 0%, var(--rotary-dark-coral) 100%);
    border: none;
    color: var(--rotary-white);
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(248, 143, 105, 0.3);
}

.btn-rotary:hover {
    background: linear-gradient(135deg, var(--rotary-dark-coral) 0%, var(--rotary-coral) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(248, 143, 105, 0.4);
    color: var(--rotary-white);
}

.btn-rotary:focus {
    box-shadow: 0 0 0 0.2rem rgba(248, 143, 105, 0.5);
    color: var(--rotary-white);
}

.bg-rotary {
    background-color: var(--rotary-coral) !important;
}

.text-rotary {
    color: var(--rotary-coral) !important;
}

.border-rotary {
    border-color: var(--rotary-coral) !important;
}

.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background-color: #d1f2eb;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-info {
    background-color: #cce7ff;
    color: #004085;
    border-left: 4px solid #007bff;
}

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
    border: none;
}

.form-text {
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-container {
        padding: 25px;
        margin: 10px;
    }
    
    .form-title {
        font-size: 1.8rem;
    }
    
    .section-header {
        padding: 10px;
    }
    
    .section-header h3 {
        font-size: 1.2rem;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
    }
    
    .form-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .btn {
        display: none;
    }
    
    .alert {
        border: 1px solid #ddd;
    }
}

/* Animation for success icon */
.success-icon i {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* File input styling */
.form-control[type="file"] {
    padding: 8px 12px;
}

/* Date input styling to force uppercase placeholder */
input[type="date"] {
    color: #212529;
    text-transform: uppercase;
}

/* Target browser's internal date placeholder elements */
input[type="date"]::-webkit-datetime-edit,
input[type="date"]::-webkit-datetime-edit-fields-wrapper,
input[type="date"]::-webkit-datetime-edit-text {
    text-transform: uppercase;
}

/* For Firefox */
input[type="date"]::-moz-placeholder {
    text-transform: uppercase;
}

/* When date has value, don't transform the actual date */
input[type="date"]:not(:placeholder-shown) {
    text-transform: none;
}


/* Completely disable Bootstrap validation styling for radio buttons */
.form-check-input[type="radio"].is-valid,
.form-check-input[type="radio"].is-invalid,
.was-validated .form-check-input[type="radio"]:valid,
.was-validated .form-check-input[type="radio"]:invalid {
    border-color: #ced4da !important;
    background-color: white !important;
    background-image: none !important;
}

/* Only show custom styling for checked radio buttons */
.form-check-input[type="radio"]:checked {
    background-color: var(--rotary-coral) !important;
    border-color: var(--rotary-coral) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e") !important;
}

/* Ensure unchecked radio buttons are always normal */
.form-check-input[type="radio"]:not(:checked) {
    border-color: #ced4da !important;
    background-color: white !important;
    background-image: none !important;
}

/* Reset all validation feedback for radio button labels */
.was-validated .form-check-input[type="radio"] ~ .form-check-label,
.form-check-input[type="radio"].is-valid ~ .form-check-label,
.form-check-input[type="radio"].is-invalid ~ .form-check-label {
    color: inherit !important;
}

/* Custom Rotary alert styling */
.alert-rotary {
    color: #000000;
    background-color: #fff5f3;
    border: 1px solid var(--rotary-coral);
    border-left: 4px solid var(--rotary-coral);
}

.alert-rotary .fas {
    color: var(--rotary-coral);
}

/* Link styling */
a {
    color: var(--rotary-coral);
    text-decoration: none;
}

a:hover {
    color: var(--rotary-dark-coral);
    text-decoration: underline;
}

/* Loading animation for form submission */
.btn-rotary.loading {
    position: relative;
    color: transparent;
}

.btn-rotary.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Select2 Customization for Rotary Brand */
.select2-container--bootstrap-5 .select2-selection {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    min-height: 38px;
}

.select2-container--bootstrap-5 .select2-selection--single {
    padding: 0.375rem 0.75rem;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: var(--rotary-coral);
    box-shadow: 0 0 0 0.25rem rgba(248, 143, 105, 0.25);
}

.select2-container--bootstrap-5 .select2-dropdown {
    border-color: var(--rotary-coral);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: var(--rotary-coral);
    color: white;
}

.select2-container--bootstrap-5 .select2-results__option--selected {
    background-color: rgba(248, 143, 105, 0.2);
    color: var(--rotary-black);
}

.select2-container--bootstrap-5 .select2-search__field {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
}

.select2-container--bootstrap-5 .select2-search__field:focus {
    border-color: var(--rotary-coral);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(248, 143, 105, 0.25);
}

.select2-container--bootstrap-5 .select2-selection__placeholder {
    color: #6c757d;
}

.select2-container--bootstrap-5 .select2-selection__clear {
    color: var(--rotary-coral);
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.select2-container--bootstrap-5 .select2-selection__clear:hover {
    color: var(--rotary-dark-coral);
}
