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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* Header Styles */
.form-header {
    background: linear-gradient(to right, #2c3e50, #4a6491);
    color: white;
    padding: 30px;
    text-align: center;
    border-bottom: 5px solid #3498db;
}

.form-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.form-header h2 {
    font-size: 2rem;
    margin: 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.subtitle {
    font-size: 1.2rem;
    color: #ecf0f1;
    font-style: italic;
    margin-top: 10px;
}

/* Form Sections */
.form-section {
    padding: 25px;
    border-bottom: 1px solid #eee;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

.required {
    color: #e74c3c;
    margin-left: 5px;
}

.required-icon {
    color: #e74c3c;
    font-size: 0.8em;
}

/* Input Styles */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    background: #f8f9fa;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3498db;
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* Date Time Group */
.datetime-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.datetime-group .form-group {
    margin-bottom: 0;
}

.datetime-group input,
.datetime-group select {
    margin-top: 5px;
}

/* Name Group */
.name-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

/* Address Row */
.address-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* Radio Buttons */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 10px 0;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s;
}

.radio-label:hover {
    background: #e9ecef;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Star Rating */
.star-rating {
    display: flex;
    gap: 10px;
    padding: 15px 0;
}

.star {
    font-size: 2rem;
    color: #ddd;
    cursor: pointer;
    transition: all 0.3s;
}

.star:hover,
.star.selected {
    color: #f39c12;
    transform: scale(1.1);
}

/* Signature Pad */
.signature-container {
    background: white;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    margin-top: 10px;
}

.signature-wrapper {
    border: 1px solid #ccc;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 15px;
}

canvas#signatureCanvas {
    display: block;
    background: white;
    cursor: crosshair;
}

.signature-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.signature-note {
    color: #666;
    font-style: italic;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* Button Styles */
.form-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 30px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.btn-primary,
.btn-secondary {
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 180px;
}

.btn-primary {
    background: linear-gradient(to right, #3498db, #2980b9);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(to right, #2980b9, #1c6ea4);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

/* Honeypot Field */
.honeypot {
    display: none !important;
}

/* Footer */
.form-footer {
    text-align: center;
    padding: 20px;
    background: #2c3e50;
    color: white;
    margin-top: 20px;
}

.admin-link a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
}

.admin-link a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 10px;
    }
    
    .form-header h1 {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .form-header h2 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .datetime-group {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 300px;
    }
}

/* Success/Error Messages */
.message {
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

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

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== LOGO STYLES ===== */

/* Logo Container */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Logo Wrapper - Fixed size container */
.logo-wrapper {
    flex-shrink: 0;
    width: 180px;  /* Fixed width */
    height: 80px;  /* Fixed height */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Logo Image - Will auto-fit inside container */
.site-logo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* This makes the logo fit nicely */
    display: block;
}

/* Text Logo Fallback */
.text-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    padding: 10px 20px;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    width: 100%;
    height: 100%;
    justify-content: center;
}

.text-logo i {
    font-size: 1.8rem;
    color: #3498db;
}

/* Header Content */
.header-content {
    text-align: center;
    flex: 1;
    min-width: 300px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo-container {
        flex-direction: column;
        gap: 20px;
        padding: 15px;
    }
    
    .logo-wrapper {
        width: 150px;  /* Smaller on mobile */
        height: 70px;
        order: -1; /* Put logo first on mobile */
    }
    
    .header-content {
        min-width: 100%;
    }
    
    .text-logo {
        font-size: 1.2rem;
        padding: 8px 15px;
    }
    
    .text-logo i {
        font-size: 1.5rem;
    }
}

/* Extra Small Screens */
@media (max-width: 480px) {
    .logo-wrapper {
        width: 130px;
        height: 60px;
    }
    
    .logo-container {
        gap: 15px;
        padding: 12px;
    }
}

/* For very tall logos - additional JavaScript fix */
.logo-wrapper.tall-logo {
    height: 100px;
    width: 120px;
}

.logo-wrapper.wide-logo {
    width: 200px;
    height: 60px;
}