/* Gift Registration System - Main Stylesheet */
/* Customize these styles to match your brand */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f4f4f4;
    background-image: url('../images/thank-you-pattern.png');
    background-repeat: repeat;
    background-position: 0 0;
    background-size: 200px auto; /* Adjust size as needed */
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* CSS-Only Fallback Pattern (works without image file) */
/* To customize: Change 'Thank You' to your message, adjust color/size */
body::before {
    content: 'Thank You  •  Thank You  •  Thank You  •  Thank You  •  Thank You  •  Thank You  •  Thank You  •  Thank You  •  Thank You  •  Thank You  •  Thank You  •  Thank You';
    position: fixed;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    font-size: 28px;
    color: rgba(0, 123, 255, 0.06); /* Change color here - use your brand color */
    font-weight: 300;
    letter-spacing: 15px;
    line-height: 100px;
    transform: rotate(-45deg);
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    white-space: pre;
    font-style: italic;
    opacity: 0.5;
}

/* Alternative: Straight repeating pattern (uncomment to use) */
/*
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 100px,
        rgba(0, 123, 255, 0.02) 100px,
        rgba(0, 123, 255, 0.02) 200px
    );
    pointer-events: none;
    z-index: 0;
}
*/

/* Optional: Add a subtle overlay to ensure text readability */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(244, 244, 244, 0.85); /* Semi-transparent overlay */
    pointer-events: none;
    z-index: 0;
}

/* Ensure content appears above the overlay and pattern */
.site-header,
.main-content-wrapper,
.site-footer {
    position: relative;
    z-index: 1;
}

/* Style adjustments for better contrast with pattern */
.announcement-bar {
    background-color: rgba(248, 249, 250, 0.95);
}

.site-header {
    background-color: rgba(255, 255, 255, 0.98);
}

/* Main Content Wrapper */
.main-content-wrapper {
    flex: 1;
    padding: 20px;
}

/* Container Styles */
.container {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95); /* Slightly transparent to show pattern */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    backdrop-filter: blur(5px); /* Softly blur background pattern */
    border: 1px solid rgba(0, 0, 0, 0.05); /* Subtle border */
}

/* Typography */
h1, h2, h3 {
    color: #333;
    margin-bottom: 20px;
}

.container h1 {
    text-align: center;
    color: #007bff;
    font-size: 32px;
    margin-bottom: 30px;
}

/* Availability Bar */
.availability-bar {
    background-color: #f0f0f0;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    border: 2px solid #e0e0e0;
}

.availability-bar.closed {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.availability-bar strong {
    font-size: 18px;
    display: block;
    margin-bottom: 10px;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 25px;
    background-color: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    margin: 10px 0;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, #27ae60, #2ecc71);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.progress-fill.warning {
    background: linear-gradient(to right, #f39c12, #f1c40f);
}

.progress-fill.danger {
    background: linear-gradient(to right, #e74c3c, #c0392b);
}

/* Disclaimer Box */
.disclaimer {
    background-color: #d1ecf1;
    color: #0c5460;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #bee5eb;
    border-left: 4px solid #17a2b8;
}

.disclaimer h3 {
    margin-bottom: 10px;
    font-size: 18px;
    color: #0c5460;
}

.disclaimer p {
    margin: 0;
    line-height: 1.6;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
    font-size: 15px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background-color: #fff;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

input:disabled,
select:disabled,
textarea:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.7;
}

textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

/* Select Dropdown Styling */
select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23333'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 40px;
    appearance: none;
}

select optgroup {
    font-weight: bold;
    font-style: normal;
    color: #333;
    background-color: #f0f0f0;
}

select option {
    font-weight: normal;
    padding: 5px;
}

/* Required and Optional Indicators */
.required {
    color: #dc3545;
    font-weight: bold;
}

.optional {
    color: #6c757d;
    font-weight: normal;
    font-size: 13px;
}

/* Form Helper Text */
.form-text {
    font-size: 13px;
    color: #6c757d;
    margin-top: 5px;
    font-style: italic;
}

/* Submit Button */
.submit-btn {
    background: linear-gradient(to right, #27ae60, #2ecc71);
    color: white;
    padding: 14px 30px;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.submit-btn:hover {
    background: linear-gradient(to right, #229954, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.submit-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Message Boxes */
.message {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Closed Registration Message */
.closed-message {
    text-align: center;
    padding: 40px;
    color: #721c24;
}

.closed-message h2 {
    margin-bottom: 15px;
    font-size: 28px;
}

.closed-message p {
    font-size: 16px;
    line-height: 1.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 0 10px;
    }
    
    .container h1 {
        font-size: 26px;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .submit-btn {
        font-size: 16px;
        padding: 12px 24px;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .announcement-bar,
    .confirmation-actions {
        display: none;
    }
    
    .container {
        box-shadow: none;
        padding: 0;
    }
    
    body {
        background: white;
    }
}

/* Registration Success Styles */
.registration-success {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(to right, #27ae60, #2ecc71);
    color: white;
    font-size: 48px;
    line-height: 80px;
    border-radius: 50%;
    margin: 0 auto 30px;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.registration-success h1 {
    color: #27ae60;
    margin-bottom: 30px;
    font-size: 36px;
}

.success-details {
    background: rgba(248, 249, 250, 0.95); /* Slightly transparent */
    border-radius: 12px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    backdrop-filter: blur(5px);
}

.tag-display {
    margin-bottom: 30px;
}

.tag-display h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 24px;
}

.tag-number-large {
    font-size: 72px;
    font-weight: bold;
    color: #007bff;
    background: white;
    padding: 20px 40px;
    border-radius: 12px;
    display: inline-block;
    box-shadow: 0 4px 20px rgba(0,123,255,0.2);
    margin: 20px 0;
    font-family: 'Courier New', monospace;
}

.important-notice {
    color: #dc3545;
    font-weight: bold;
    font-size: 16px;
    margin-top: 15px;
}

.pickup-details,
.next-steps {
    margin: 30px 0;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.pickup-details h3,
.next-steps h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 20px;
    text-align: center;
}

.detail-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.detail-box p {
    margin: 8px 0;
    font-size: 16px;
    line-height: 1.6;
}

.detail-box strong {
    color: #495057;
    display: inline-block;
    min-width: 80px;
}

.next-steps ul {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 20px 20px 40px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    list-style-type: none;
}

.next-steps li {
    margin: 10px 0;
    padding-left: 25px;
    position: relative;
    font-size: 16px;
}

.next-steps li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
    font-size: 18px;
}

.confirmation-actions {
    margin-top: 40px;
}

.btn-print {
    background: #6c757d;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s ease;
}

.btn-print:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.help-text {
    margin-top: 20px;
    color: #6c757d;
    font-size: 14px;
}

.already-registered-notice {
    color: #17a2b8;
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 500;
}

/* Responsive adjustments for success page */
@media (max-width: 768px) {
    .tag-number-large {
        font-size: 48px;
        padding: 15px 30px;
    }
    
    .registration-success h1 {
        font-size: 28px;
    }
    
    .success-details {
        padding: 20px;
    }
}
