/**
 * HubSpot Forms Plugin - Form Styles
 * Styles for Toy Drive Registration Form
 */

:root {
    --brand-primary: #da6220;
    --brand-secondary: #4d5a89;
    --brand-highlight: #ffeb3b;
    --brand-success: #4caf50;
}

/* Form Container */
.hubspot-children-form-wrapper {
    max-width: 100%;
    margin: 20px auto;
    padding: 30px;
    background: linear-gradient(160deg, #ffffff 0%, #fffaf4 55%, #fffde8 100%);
    border-radius: 8px;
    border: 1px solid rgba(77, 90, 137, 0.16);
    box-shadow: 0 10px 24px rgba(77, 90, 137, 0.12);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Form Messages */
.form-message {
    margin-top: 20px;
    animation: slideDown 0.3s ease-out;
}

.form-message p {
    padding: 12px 15px;
    border-radius: 4px;
    margin: 0;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Headings */
.hubspot-children-form-wrapper h3 {
    color: #333333;
    font-size: 25px;
    font-weight: 500;
    margin-bottom: 25px;
    text-align: center;
    border-bottom: 3px solid var(--brand-secondary);
    padding-bottom: 15px;
}

/* Form Labels */
.hubspot-children-form-wrapper label {
    display: block;
    margin-bottom: 6px;
    color: #444444;
    font-weight: 500;
    font-size: 14px;
}

/* Form Inputs */
.hubspot-children-form-wrapper input[type="text"],
.hubspot-children-form-wrapper input[type="email"],
.hubspot-children-form-wrapper input[type="number"],
.hubspot-children-form-wrapper textarea,
.hubspot-children-form-wrapper select {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 15px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Input Focus States */
.hubspot-children-form-wrapper input[type="text"]:focus,
.hubspot-children-form-wrapper input[type="email"]:focus,
.hubspot-children-form-wrapper input[type="number"]:focus,
.hubspot-children-form-wrapper textarea:focus,
.hubspot-children-form-wrapper select:focus {
    outline: none;
    border-color: var(--brand-secondary);
    box-shadow: 0 0 0 3px rgba(77, 90, 137, 0.16);
}

/* Select Dropdown */
.hubspot-children-form-wrapper select {
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="black" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px;
    padding-right: 35px;
}

/* Student Sections */
.hubspot-children-form-wrapper .student {
    background: linear-gradient(135deg, #ffffff 0%, #f7f9ff 100%);
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid var(--brand-secondary);
    border-radius: 4px;
}

.hubspot-children-form-wrapper .student:nth-child(1) {
    border-left-color: var(--brand-secondary);
}

.hubspot-children-form-wrapper .student:nth-child(2) {
    border-left-color: var(--brand-success);
}

.hubspot-children-form-wrapper .student:nth-child(3) {
    border-left-color: var(--brand-primary);
}

.hubspot-children-form-wrapper .student:nth-child(4) {
    border-left-color: var(--brand-highlight);
}

.hubspot-children-form-wrapper .student:nth-child(n+5) {
    border-left-color: #9b59b6;
}

/* Student Section Heading */
.hubspot-children-form-wrapper .student-header {
    font-size: 14px;
    font-weight: 600;
    color: var(--brand-secondary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.hubspot-children-form-wrapper .student-number {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--brand-secondary), var(--brand-primary));
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    margin-right: 8px;
    font-size: 12px;
    font-weight: bold;
}

/* Buttons */
#add-student,
.hubspot-children-form-wrapper input[type="submit"] {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
    margin-top: 10px;
}

/* Add Student Button */
#add-student {
    background: linear-gradient(135deg, var(--brand-success), #7bc67f);
    color: white;
}

#add-student:hover {
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.32);
}

#add-student:active {
    transform: scale(0.98);
}

/* Submit Button */
.hubspot-children-form-wrapper input[type="submit"] {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary))!important;
    color: white!important;
    width: 100%;
}

.hubspot-children-form-wrapper input[type="submit"]:hover {
    box-shadow: 0 6px 18px rgba(77, 90, 137, 0.35);
}

.hubspot-children-form-wrapper input[type="submit"]:active {
    transform: scale(0.99);
}

/* Success and Error Messages */
.hubspot-children-form-wrapper p[style*="color:green"],
.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 12px 15px;
    border-radius: 4px;
    border-left: 4px solid #28a745;
    margin-bottom: 15px;
}

.hubspot-children-form-wrapper p[style*="color:red"],
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 4px;
    border-left: 4px solid #dc3545;
    margin-bottom: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hubspot-children-form-wrapper {
        padding: 20px;
        margin: 10px;
    }

    .hubspot-children-form-wrapper h3 {
        font-size: 20px;
    }

    .hubspot-children-form-wrapper input[type="text"],
    .hubspot-children-form-wrapper input[type="email"],
    .hubspot-children-form-wrapper input[type="number"],
    .hubspot-children-form-wrapper select {
        font-size: 16px; /* Prevents zoom on mobile */
    }
}

@media (max-width: 480px) {
    .hubspot-children-form-wrapper {
        padding: 15px;
        max-width: 100%;
    }

    #add-student,
    .hubspot-children-form-wrapper input[type="submit"] {
        width: 100%;
        margin-right: 0;
    }

    .hubspot-children-form-wrapper .student {
        padding: 15px;
    }
}

/* Volunteer form modern block */
.hubspot-children-form-wrapper .volunteer-intro {
    background: linear-gradient(140deg, rgba(218, 98, 32, 0.1) 0%, rgba(77, 90, 137, 0.08) 55%, rgba(255, 235, 59, 0.2) 100%);
    border: 1px solid rgba(77, 90, 137, 0.2);
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 22px;
}

.hubspot-children-form-wrapper .volunteer-intro h4 {
    margin: 0 0 6px;
    color: #242424;
    font-size: 35px;
    font-weight: 500;
}

.hubspot-children-form-wrapper .volunteer-intro > p {
    margin: 0 0 8px;
    color: #555;
    font-size: 15px;
}

.hubspot-children-form-wrapper .volunteer-intro > p:last-of-type {
    margin-bottom: 16px;
}

.hubspot-children-form-wrapper .volunteer-role-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.hubspot-children-form-wrapper .volunteer-role-card {
    border: 1px solid rgba(77, 90, 137, 0.18);
    border-radius: 10px;
    background: linear-gradient(165deg, #ffffff 0%, #fffaf0 100%);
    padding: 14px;
}

.hubspot-children-form-wrapper .volunteer-role-card h5 {
    margin: 0 0 6px;
    color: #242424;
    font-size: 22px;
    font-weight: 500;
}

.hubspot-children-form-wrapper .volunteer-role-card .spots {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(218, 98, 32, 0.2), rgba(255, 235, 59, 0.5));
    color: #6a380a;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1px;
}

.hubspot-children-form-wrapper .volunteer-role-card p {
    margin: 0;
    color: #5b5b5b;
    font-size: 14px;
    line-height: 1.45;
}

.hubspot-children-form-wrapper .volunteer-role-card .volunteer-register-btn {
    margin-top: 12px;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-secondary), var(--brand-primary));
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.hubspot-children-form-wrapper .volunteer-role-card .volunteer-register-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(77, 90, 137, 0.22);
}

.hubspot-children-form-wrapper .volunteer-role-card .volunteer-register-btn:disabled {
    background: #c4c9d9;
    color: #61697f;
    cursor: not-allowed;
    box-shadow: none;
}

.hubspot-children-form-wrapper #volunteer-signup-form {
    border: 1px solid rgba(77, 90, 137, 0.18);
    border-radius: 12px;
    padding: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}

.hubspot-children-form-wrapper #volunteer-signup-form .form-group {
    margin-bottom: 14px;
}

.hubspot-children-form-wrapper #volunteer-signup-form .required {
    color: var(--brand-primary);
    font-weight: 700;
}

.hubspot-children-form-wrapper #volunteer-signup-form input[type="text"],
.hubspot-children-form-wrapper #volunteer-signup-form input[type="email"],
.hubspot-children-form-wrapper #volunteer-signup-form input[type="tel"],
.hubspot-children-form-wrapper #volunteer-signup-form textarea,
.hubspot-children-form-wrapper #volunteer-signup-form select {
    border-radius: 8px;
    border-color: rgba(77, 90, 137, 0.25);
}

.hubspot-children-form-wrapper #volunteer-signup-form select option:disabled {
    color: #8f8f8f;
}

@media (max-width: 768px) {
    .hubspot-children-form-wrapper .volunteer-role-grid {
        grid-template-columns: 1fr;
    }

    .hubspot-children-form-wrapper #volunteer-signup-form {
        padding: 16px;
    }
}
