/* Child Name Change Form Styles */

/* Import Google font for better consistency */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Child Form Header */
.child-form-header,
div.child-form-header,
.container .child-form-header {
    position: relative;
    background: #003366;
    color: white;
    padding: 2.5rem 2rem 2rem;
    border-radius: 12px 12px 0 0;
    margin-bottom: 1.5rem;
    overflow: hidden;
    height: auto;
    display: block;
    text-align: center;
}

.child-form-header h1,
.child-form-header h2 {
    color: white !important;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.child-form-header p {
    color: rgba(255, 255, 255, 0.8) !important;
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 400;
}

/* Header Background Animation */
.header-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #4facfe 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    border-radius: 20px;
}

.header-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    border-radius: 20px;
}

.header-content {
    position: relative;
    z-index: 3;
    text-align: center;
}

.icon-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.header-icon {
    font-size: 4rem;
    color: white;
    position: relative;
    z-index: 2;
    animation: iconFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
}

.icon-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.header-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
    animation: slideInFromTop 1s ease-out;
}

.header-subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    margin: 0 0 1.5rem 0;
    opacity: 0.95;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    animation: slideInFromBottom 1s ease-out 0.2s both;
}

.decorative-line {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, white, transparent);
    margin: 0 auto;
    border-radius: 2px;
    animation: lineGlow 2s ease-in-out infinite alternate;
}

/* Floating Shapes */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: floatShape 6s ease-in-out infinite;
}

.shape-1 {
    width: 60px;
    height: 60px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 40px;
    height: 40px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.shape-3 {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

/* Child Requirements Showcase */
.child-requirements-showcase {
    background: linear-gradient(135deg, #f8fbff 0%, #e8f4fd 100%);
    border-radius: 16px;
    padding: 0;
    margin: 2rem 0;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.1);
    overflow: hidden;
    width: 100%;
    display: block;
    position: relative;
    clear: both;
    animation: slideInFromLeft 1s ease-out 0.5s both;
}

.requirements-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.header-icon-wrapper {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    color: white;
    animation: rotateIcon 3s ease-in-out infinite;
}

.requirements-title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
}

.requirements-content {
    padding: 2rem;
    background: transparent;
}

.requirements-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 768px) {
    .requirements-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
}

.requirement-card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.75rem 1.5rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #f0f4f8;
    position: relative;
    overflow: hidden;
    margin: 0;
    list-style: none;
    width: 100%;
    box-sizing: border-box;
}

.requirement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.requirement-card:hover::before {
    opacity: 1;
}

.requirement-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}

.card-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    margin: 0;
}

.card-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: transform 0.6s ease;
}

.requirement-card:hover .card-icon::before {
    transform: rotate(45deg) translate(100%, 100%);
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    margin: 0;
    padding: 0;
}

.card-title {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.2;
    margin: 0 0 0.25rem 0;
    display: block;
    padding: 0;
}

.card-description {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
    display: block;
    margin: 0.25rem 0 0 0;
    padding: 0;
}

/* Form Steps Override for Child Form */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

/* Step Title Override for Child Form */
.step-title {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* Unique step title override with higher specificity for child form */
.step-indicator .step-title-small {
    display: block;
    font-size: 0.65rem !important;
    color: var(--text-light);
    font-weight: 400 !important;
    transition: color 0.3s ease;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.2;
}

.step-indicator.active .step-title,
.step-indicator.active .step-title-small {
    color: var(--primary);
    font-weight: 600 !important;
}

/* Form Tips Enhancement */
.form-tips {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 4px solid #2196f3;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.tip-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.tip-icon {
    color: #1976d2;
    font-size: 1.1rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.tip-content p {
    margin-bottom: 0;
    color: #1565c0;
    font-weight: 500;
}

/* Enhanced Form Controls for Child Form */
.form-select:focus,
.form-control:focus {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 107, 0.25);
}

.form-floating label {
    color: #666;
    font-weight: 500;
}

.form-floating>.form-control:focus~label,
.form-floating>.form-control:not(:placeholder-shown)~label,
.form-floating>.form-select:focus~label,
.form-floating>.form-select:not([value=""])~label {
    color: #ff6b6b;
    font-weight: 600;
}

/* Animations */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes iconFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes lineGlow {
    0% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    }
}

@keyframes floatShape {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    33% {
        transform: translateY(-20px) rotate(120deg);
    }

    66% {
        transform: translateY(10px) rotate(240deg);
    }
}

@keyframes rotateIcon {

    0%,
    100% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(5deg);
    }
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {

    /* Mobile form fixes */
    .form-select {
        font-size: 0.9rem !important;
        padding: 0.75rem 0.5rem !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        word-wrap: break-word !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .form-select option {
        font-size: 0.85rem !important;
        padding: 0.5rem !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .delivery-method-group {
        margin-bottom: 1.5rem !important;
    }

    .form-card {
        margin: 0 auto !important;
        border-radius: 0.5rem !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .card-body {
        padding: 1.25rem !important;
    }
}

@media (max-width: 480px) {

    /* Extra aggressive mobile form fixes for very small screens */
    .form-select {
        font-size: 0.8rem !important;
        padding: 0.6rem 0.4rem !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        word-wrap: break-word !important;
        border-radius: 0.375rem !important;
    }

    .form-select option {
        font-size: 0.75rem !important;
        padding: 0.4rem !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        line-height: 1.2 !important;
    }

    .delivery-method-group {
        margin-bottom: 1rem !important;
    }

    .form-label {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
        font-weight: 600 !important;
    }

    .form-text {
        font-size: 0.75rem !important;
        margin-top: 0.25rem !important;
    }

    .form-card {
        margin: 0 auto !important;
        border-radius: 0.25rem !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .card-body {
        padding: 1rem !important;
    }

    /* Ensure container doesn't overflow */
    .container,
    .container-fluid {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
}