/* Trial page specific CSS */

.trial-container {
    height: 100vh;
    display: flex;
    overflow: hidden;
}

.form-content {
    width: 100%;
    max-width: 32rem;
}

/* Step Indicator */
.step-indicator {
    width: 100%;
    max-width: 28rem;
    margin: 0 auto 2rem;
}

.step-indicator-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.step-circle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    position: relative;
    flex-shrink: 0;
}

.step-circle.inactive {
    background: #e5e7eb;
}

.step-circle.active {
    background: #004aad;
    box-shadow: 0 0 0 0.25rem rgba(0, 74, 173, 0.2);
}

.step-circle.completed {
    background: #004aad;
}

.step-number {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
}

.step-circle.active .step-number,
.step-circle.completed .step-number {
    color: white;
}

.step-check {
    display: none;
    color: white;
    width: 1.25rem;
    height: 1.25rem;
}

.step-circle.completed .step-check {
    display: block;
}

.step-circle.completed .step-number {
    display: none;
}

.step-label {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #9ca3af;
    text-align: center;
    line-height: 1.2;
    min-height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-item.active .step-label {
    color: #004aad;
}

.step-connector {
    flex: 1;
    margin: 0 0.5rem;
    margin-bottom: 1.5rem;
}

.step-connector-line {
    height: 0.25rem;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.step-connector-fill {
    height: 100%;
    background: #004aad;
    width: 0%;
    transition: width 0.4s;
}

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

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

.step-title {
    text-align: center;
    margin-bottom: 1.5rem;
}

.step-title h2 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #0f172a;
    margin-bottom: 0.375rem;
}

.step-title p {
    color: #64748b;
    font-size: 0.875rem;
}

.form-fields {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-field-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.form-input,
.form-select {
    width: 100%;
    height: 3rem;
    padding: 0 1rem;
    font-size: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

/* Inputs with icons need left padding for the icon */
.form-field .input-wrapper .form-input {
    padding-left: 2.75rem;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #004aad;
    box-shadow: 0 0 0 3px rgba(0, 74, 173, 0.1);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23374151' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

.password-field {
    position: relative;
}

.password-field .input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    z-index: 2;
}

.password-toggle:hover {
    color: #374151;
}

.password-requirements {
    margin-top: 0.5rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.375rem;
}

.password-req-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.password-req-dot {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    background: #d1d5db;
}

.password-req-dot.valid {
    background: #10b981;
}

.password-req-text {
    color: #6b7280;
}

.password-req-text.valid {
    color: #059669;
}

/* Module Selection */
.modules-section {
    margin-bottom: 1.5rem;
}

.modules-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.module-card {
    position: relative;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 2px solid #e5e7eb;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.module-card:hover {
    border-color: #d1d5db;
}

.module-card.selected {
    border-color: #004aad;
    background: rgba(0, 74, 173, 0.05);
}

.module-popular-badge {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    background: #f59e0b;
    color: #78350f;
    font-size: 0.625rem;
    font-weight: bold;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

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

.module-icon-wrapper {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    flex-shrink: 0;
}

.module-card.selected .module-icon-wrapper {
    background: #004aad;
}

.module-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #6b7280;
}

.module-card.selected .module-icon {
    color: white;
}

.module-info {
    flex: 1;
    min-width: 0;
}

.module-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: #0f172a;
    margin-bottom: 0.125rem;
}

.module-card.selected .module-name {
    color: #004aad;
}

.module-description {
    font-size: 0.75rem;
    color: #6b7280;
}

.module-check {
    width: 1.25rem;
    height: 1.25rem;
    background: #004aad;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.module-card.selected .module-check {
    display: flex;
}

.module-check-icon {
    width: 0.75rem;
    height: 0.75rem;
    color: white;
}

.addons-section {
    margin-top: 1.5rem;
}

.addons-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.addon-item {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
}

.addon-item:hover {
    border-color: #d1d5db;
}

.addon-item.selected {
    border-color: #004aad;
    background: rgba(0, 74, 173, 0.05);
}

.addon-icon-wrapper {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    flex-shrink: 0;
}

.addon-item.selected .addon-icon-wrapper {
    background: rgba(0, 74, 173, 0.1);
}

.addon-icon {
    width: 1rem;
    height: 1rem;
    color: #6b7280;
}

.addon-item.selected .addon-icon {
    color: #004aad;
}

.addon-info {
    flex: 1;
    min-width: 0;
}

.addon-name {
    font-weight: 500;
    font-size: 0.875rem;
    color: #0f172a;
    margin-bottom: 0.125rem;
}

.addon-item.selected .addon-name {
    color: #004aad;
}

.addon-description {
    font-size: 0.75rem;
    color: #6b7280;
}

.addon-price {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    background: #f3f4f6;
    color: #374151;
}

.addon-price.free {
    background: #d1fae5;
    color: #065f46;
}

.addon-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #d1d5db;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.addon-item.selected .addon-checkbox {
    background: #004aad;
    border-color: #004aad;
}

.addon-check-icon {
    width: 0.75rem;
    height: 0.75rem;
    color: white;
    display: none;
}

.addon-item.selected .addon-check-icon {
    display: block;
}

/* Navigation */
.form-navigation {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4b5563;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 0.875rem;
}

.btn-back:hover {
    color: #0f172a;
}

.btn-back.hidden {
    display: none;
}

.btn-next {
    background: #004aad;
    color: white;
    padding: 0.75rem 2rem;
    height: 3rem;
    border-radius: 0.75rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-next:hover:not(:disabled) {
    background: #003d91;
    transform: translateY(-1px);
}

.btn-next:active:not(:disabled) {
    transform: translateY(0);
}

.btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #9ca3af !important;
}

.btn-next:disabled:hover {
    transform: none !important;
    background: #9ca3af !important;
}

.btn-icon {
    width: 1rem;
    height: 1rem;
}

.form-terms {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

.form-terms a {
    color: #004aad;
    text-decoration: none;
}

.form-terms a:hover {
    text-decoration: underline;
}

.form-login-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.form-login-link-text {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

.form-login-link-text a {
    color: #004aad;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.form-login-link-text a:hover {
    color: #003d91;
    text-decoration: underline;
}

/* Custom Validation Error Messages */
.form-field {
    position: relative;
}

.field-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    color: #991b1b;
    font-size: 0.75rem;
    animation: slideDown 0.3s ease-out;
}

.field-error-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.field-error-text {
    flex: 1;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-input.error,
.form-select.error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.form-input.error:focus,
.form-select.error:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.form-input.success,
.form-select.success {
    border-color: #10b981 !important;
}

.form-input.success:focus,
.form-select.success:focus {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* Installation Step */
.installation-container {
    text-align: center;
}

.installation-spinner {
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1.5rem;
    position: relative;
}

.spinner-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 4px solid rgba(0, 74, 173, 0.2);
    border-top-color: #004aad;
    animation: spin 1s linear infinite;
}

.spinner-inner {
    position: absolute;
    inset: 0.5rem;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-icon {
    width: 2rem;
    height: 2rem;
    color: #004aad;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.installation-progress {
    max-width: 28rem;
    margin: 0 auto 2rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.progress-label {
    color: #4b5563;
}

.progress-percent {
    font-weight: 600;
    color: #004aad;
}

.progress-bar {
    height: 0.75rem;
    background: #f3f4f6;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, #004aad, #0066ff);
    border-radius: 9999px;
    transition: width 0.1s;
}

.installation-steps {
    max-width: 28rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.installation-step-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 2px solid #e5e7eb;
    background: white;
    transition: all 0.3s;
}

.installation-step-item.active {
    border-color: rgba(0, 74, 173, 0.2);
    background: rgba(0, 74, 173, 0.05);
}

.installation-step-item.completed {
    border-color: #d1fae5;
    background: #d1fae5;
}

.installation-step-item.swiping-out {
    animation: swipeOut 0.5s ease-in forwards;
}

@keyframes swipeOut {
    0% {
        transform: translateX(0);
        opacity: 1;
        max-height: 200px;
        margin-bottom: 0.75rem;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
        max-height: 0;
        margin-bottom: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
}

.installation-step-item.inactive {
    opacity: 0.4;
}

.step-item-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    color: #9ca3af;
    flex-shrink: 0;
}

.installation-step-item.active .step-item-icon {
    background: #004aad;
    color: white;
}

.installation-step-item.completed .step-item-icon {
    background: #10b981;
    color: white;
}

.step-item-info {
    flex: 1;
}

.step-item-name {
    font-weight: 500;
    font-size: 0.875rem;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.installation-step-item.active .step-item-name {
    color: #004aad;
}

.installation-step-item.completed .step-item-name {
    color: #059669;
}

.step-item-description {
    font-size: 0.75rem;
    color: #6b7280;
}

.step-item-status {
    font-size: 0.875rem;
    font-weight: 600;
    color: #004aad;
}

.installation-step-item.completed .step-item-status {
    color: #059669;
}

.success-state {
    margin-top: 2rem;
    padding: 1.5rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.3s forwards;
}

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

.success-icon-wrapper {
    width: 5rem;
    height: 5rem;
    background: #10b981;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    animation: scaleInBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

@keyframes scaleInBounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-icon {
    width: 2.5rem;
    height: 2.5rem;
    color: white;
}

.success-icon path {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: checkmarkDraw 0.6s ease-out 0.4s forwards;
}

@keyframes checkmarkDraw {
    0% {
        stroke-dashoffset: 100;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

.success-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #0f172a;
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fadeIn 0.5s ease-out 0.6s forwards;
}

.success-text {
    color: #64748b;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeIn 0.5s ease-out 0.8s forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.success-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #004aad;
    color: white;
    border-radius: 0.75rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    opacity: 0;
    animation: fadeInScale 0.5s ease-out 1s forwards;
    transition: all 0.2s;
}

.success-button:hover {
    background: #003d91;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 74, 173, 0.3);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.installation-info {
    max-width: 28rem;
    margin: 1.5rem auto 0;
    background: #f9fafb;
    border-radius: 0.75rem;
    padding: 1rem;
}

.installation-info-text {
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
}

.installation-info-text strong {
    font-weight: 600;
    color: #374151;
}

.header-login-link {
    font-size: 0.875rem;
    color: #64748b;
}

.header-login-link a {
    color: #004aad;
    font-weight: 500;
    text-decoration: none;
}

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

/* Responsive */
@media (max-width: 1024px) {
    .step-indicator {
        margin-bottom: 1.5rem;
    }

    .step-circle {
        width: 2rem;
        height: 2rem;
    }

    .step-number {
        font-size: 0.75rem;
    }

    .step-check {
        width: 1rem;
        height: 1rem;
    }

    .step-label {
        font-size: 0.6875rem;
        margin-top: 0.375rem;
        min-height: 2rem;
    }

    .step-connector {
        margin: 0 0.25rem;
        margin-bottom: 1.25rem;
    }

    .step-connector-line {
        height: 0.2rem;
    }

    .modules-grid {
        grid-template-columns: 1fr;
    }
}
