/**
 * Registration Form Styles
 * Compartmentalized CSS for the registration page
 */

/* Page container */
.register-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 6rem 1rem 2rem; /* Top padding for fixed header */
    background: var(--bg-secondary, #f8f9fa);
}

.register-container {
    width: 100%;
    max-width: 800px;
}

.register-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.register-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary, #1f2937);
    margin: 0 0 0.5rem;
}

.register-header p {
    color: var(--text-secondary, #6b7280);
    font-size: 1rem;
    margin: 0;
}

/* Form container - two column layout on desktop */
.register-form {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 700px) {
    .register-form {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* Left column: Account Details */
.form-column-left {
    /* Contains account details */
}

/* Right column: Plan & Payment */
.form-column-right {
    /* Contains plan selection and card input */
}

/* Full width footer row */
.form-column-footer {
    grid-column: 1 / -1;
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
    margin-top: 0.5rem;
}

/* Section headers */
.form-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
    color: #1f2937;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-section-header i {
    color: #3b82f6;
    font-size: 0.9rem;
}

/* Two-column layout for fields within a column */
.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (max-width: 700px) {
    .form-column-right {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        border-top: 1px solid #e5e7eb;
    }
    
    .form-column-footer {
        margin-top: 1.5rem;
    }
}

/* Form groups */
.form-group {
    margin-bottom: 1rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

/* Labels */
.form-label {
    display: block;
    color: #374151;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
}

/* Inputs */
.register-form .form-input,
.register-form input[type="text"],
.register-form input[type="email"],
.register-form input[type="password"] {
    width: 100%;
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #1f2937;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.register-form .form-input:focus,
.register-form input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.register-form .form-input::placeholder,
.register-form input::placeholder {
    color: #9ca3af;
}

/* Error messages */
.form-error {
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 0.35rem;
}

/* Plan selector trigger */
.plan-selector-trigger {
    width: 100%;
    padding: 1rem;
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.plan-selector-trigger:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.plan-trigger-content {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.plan-trigger-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.plan-trigger-text {
    flex: 1;
    text-align: left;
}

.plan-trigger-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 1rem;
}

.plan-trigger-desc {
    color: #6b7280;
    font-size: 0.85rem;
    margin-top: 0.15rem;
}

.plan-trigger-arrow {
    color: #9ca3af;
    font-size: 0.9rem;
}

/* Card input container */
#card-element {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.875rem 1rem;
    min-height: 44px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#card-element:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

#card-errors {
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 0.35rem;
    display: none;
}

/* Secure badge */
.secure-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    color: #6b7280;
    font-size: 0.8rem;
}

.secure-badge i {
    color: #10b981;
}

/* Submit button */
.register-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    margin-top: 1.75rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.register-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.register-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-price {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.6rem;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Form footer */
.form-footer {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.form-footer span {
    color: #6b7280;
    font-size: 0.9rem;
}

.form-footer a {
    color: #3b82f6;
    font-weight: 500;
    text-decoration: none;
}

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

/* Plan Modal Overlay */
.plan-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
    padding: 1rem;
}

.plan-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.plan-modal {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.25s;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.plan-modal-overlay.active .plan-modal {
    transform: scale(1);
}

.plan-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.plan-modal-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.plan-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: background 0.2s;
}

.plan-modal-close:hover {
    background: #e5e7eb;
}

.plan-modal-body {
    padding: 1.5rem;
}

/* Plan Cards in Modal */
.plan-card {
    padding: 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1rem;
}

.plan-card:last-child {
    margin-bottom: 0;
}

.plan-card:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

.plan-card.selected {
    border-color: #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(139, 92, 246, 0.05));
}

.plan-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.plan-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.plan-card-info {
    flex: 1;
}

.plan-card-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 1.1rem;
}

.plan-card-price {
    color: #3b82f6;
    font-weight: 700;
    font-size: 1.25rem;
    margin-top: 0.25rem;
}

.plan-card-price span {
    font-size: 0.85rem;
    font-weight: 400;
    color: #6b7280;
}

.plan-card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.plan-card-feature {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: #4b5563;
    background: #f3f4f6;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
}

.plan-card-feature i {
    color: #10b981;
    font-size: 0.7rem;
}

.plan-card-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-card-select-btn {
    width: 100%;
    padding: 0.75rem;
    margin-top: 1rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.plan-card-select-btn:hover {
    background: #2563eb;
}

.plan-card.selected .plan-card-select-btn {
    background: #10b981;
}
