﻿/* Keyframe Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes wiggle {
    0%, 100% { transform: translateX(0) translateY(-3px) rotate(0deg); }
    25% { transform: translateX(-3px) translateY(-3px) rotate(-1deg); }
    50% { transform: translateX(0) translateY(-4px) rotate(0deg); }
    75% { transform: translateX(3px) translateY(-3px) rotate(1deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

:root {
    --primary-navy: #1e2a5e;
    --accent-yellow: #ffd700;
    --text-dark: #333333;
    --text-gray: #666666;
    --border-gray: #d0d0d0;
    --background-white: #ffffff;
    --pronk-blue: #0016a7;
}

* {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

body {
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.trial-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--background-white);
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    min-height: 100vh;
    animation: fadeIn 0.6s ease-out;
}

.trial-header {
    background-color: var(--pronk-blue);
    padding: 20px 15px;
    text-align: center;
    animation: slideUp 0.5s ease-out;
}

.trial-header img {
    max-width: 280px;
    width: 100%;
    height: auto;
    animation: bounceIn 0.8s ease-out 0.3s both;
}

.trial-form-content {
    padding: 25px 20px;
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.trial-form-title {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 15px;
    line-height: 1.3;
    animation: slideUp 0.6s ease-out 0.4s both;
}

.trial-form-description {
    text-align: center;
    color: var(--text-gray);
    font-size: 15px;
    margin-bottom: 30px;
    line-height: 1.5;
}

.trial-form-group {
    margin-bottom: 20px;
    transition: transform 0.2s ease;
}

.trial-form-group:hover {
    transform: translateX(3px);
}

.trial-form-label {
    display: block;
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.trial-form-input {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    font-size: 16px;
    color: var(--text-dark);
    transition: border-color 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

.trial-form-input:focus {
    outline: none;
    border-color: var(--primary-navy);
    border-width: 2px;
    padding: 13px 14px;
    transform: scale(1.01);
    box-shadow: 0 0 0 3px rgba(30, 42, 94, 0.1);
    transition: all 0.3s ease;
}

.trial-form-input::placeholder {
    color: #999;
}

.trial-checkbox-group {
    margin-bottom: 25px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.trial-checkbox-input {
    margin-top: 4px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-appearance: none;
    appearance: none;
    border: 2px solid var(--border-gray);
    border-radius: 4px;
    position: relative;
    background-color: white;
}

.trial-checkbox-input:checked {
    background-color: var(--primary-navy);
    border-color: var(--primary-navy);
}

.trial-checkbox-input:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    line-height: 1;
}

.trial-checkbox-input:focus {
    outline: 2px solid var(--primary-navy);
    outline-offset: 2px;
}

.trial-checkbox-label {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.5;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.trial-checkbox-label a {
    color: var(--primary-navy);
    text-decoration: underline;
    -webkit-tap-highlight-color: rgba(0, 22, 167, 0.1);
}

.trial-checkbox-label a:hover,
.trial-checkbox-label a:active {
    color: #2d3f8c;
}

.trial-submit-button {
    width: 100%;
    padding: 16px;
    background-color: var(--primary-navy);
    color: var(--background-white);
    border: none;
    border-radius: 8px;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
    touch-action: manipulation;
    position: relative;
}

.trial-submit-button:hover,
.trial-submit-button:active {
    background-color: #2d3f8c;
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 22, 167, 0.3);
    animation: wiggle 0.5s ease-in-out;
}

.trial-submit-button:disabled {
    background-color: #999;
    cursor: not-allowed;
}

.trial-error-message {
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
    display: block;
}

.trial-success-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 20px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.trial-success-message p {
    margin: 0 0 10px 0;
    font-size: 15px;
    line-height: 1.5;
}

.trial-success-message img {
    width: 50px;
    margin-top: 10px;
}

/* iPhone-specific optimizations */
@media (max-width: 640px) {
    .trial-container {
        border-radius: 0;
        box-shadow: none;
    }

    .trial-header {
        padding: 20px 15px;
    }

    .trial-header img {
        max-width: 220px;
    }

    .trial-form-content {
        padding: 20px 16px;
    }

    .trial-form-title {
        font-size: 22px;
    }

    .trial-form-description {
        font-size: 14px;
        margin-bottom: 25px;
    }

    .trial-form-group {
        margin-bottom: 18px;
    }

    .trial-form-input {
        font-size: 16px;
        padding: 12px 14px;
    }

    .trial-form-input:focus {
        padding: 11px 13px;
    }

    .trial-checkbox-label {
        font-size: 13px;
    }

    .trial-submit-button {
        padding: 14px;
        font-size: 16px;
    }
}

/* iPhone SE and smaller */
@media (max-width: 375px) {
    .trial-header img {
        max-width: 200px;
    }

    .trial-form-content {
        padding: 18px 14px;
    }

    .trial-form-title {
        font-size: 20px;
    }

    .trial-form-description {
        font-size: 13px;
    }

    .trial-checkbox-label {
        font-size: 12px;
    }
}

/* Larger phones in landscape */
@media (min-width: 641px) and (max-width: 900px) {
    .trial-container {
        margin: 20px auto;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .trial-form-content {
        padding: 30px 25px;
    }
}

/* Desktop */
@media (min-width: 901px) {
    .trial-container {
        margin: 20px auto;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .trial-header {
        padding: 30px 20px;
    }

    .trial-header img {
        max-width: 300px;
    }

    .trial-form-content {
        padding: 40px;
    }

    .trial-form-title {
        font-size: 28px;
        margin-bottom: 20px;
    }

    .trial-form-description {
        margin-bottom: 35px;
    }

    .trial-form-group {
        margin-bottom: 24px;
    }

    .trial-checkbox-group {
        margin-bottom: 30px;
    }
}
