/* Frontend styles for LH Billing plugin */

.lh-billing-subscription-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.lh-billing-plans-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.lh-billing-plan-card {
    position: relative;
}

.lh-billing-plan-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.lh-billing-plan-label {
    display: block;
    padding: 2rem;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.lh-billing-plan-label:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.lh-billing-plan-card input[type="radio"]:checked + .lh-billing-plan-label {
    border-color: #3b82f6;
    background-color: #ffffff;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
    transform: translateY(-4px);
}

.lh-billing-plan-card.lh-billing-plan-featured .lh-billing-plan-label {
    border-color: #3b82f6;
    background: linear-gradient(to bottom, #ffffff 0%, #f8fafc 100%);
}

.lh-billing-plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #3b82f6;
    color: #ffffff;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.lh-billing-plan-discount {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: #10b981;
    color: #ffffff;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 700;
    z-index: 5;
}

.lh-billing-plan-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.lh-billing-plan-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.lh-billing-plan-subtitle {
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.lh-billing-plan-price {
    text-align: center;
    margin: 2rem 0;
}

.lh-billing-plan-price-main {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.lh-billing-plan-amount {
    font-size: 3rem;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}

.lh-billing-plan-currency {
    font-size: 1.5rem;
    font-weight: 600;
    color: #6b7280;
    line-height: 1;
}

.lh-billing-plan-decimals {
    font-size: 1.5rem;
    font-weight: 600;
    color: #6b7280;
    line-height: 1;
}

.lh-billing-plan-period {
    font-size: 1rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.lh-billing-plan-savings {
    font-size: 0.875rem;
    color: #10b981;
    font-weight: 600;
    margin-top: 0.5rem;
}

.lh-billing-plan-features {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    text-align: left;
}

.lh-billing-plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    color: #374151;
    font-size: 1rem;
    line-height: 1.5;
}

.lh-billing-feature-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #10b981;
    color: #ffffff;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 2px;
}

.lh-billing-feature-text {
    flex: 1;
}

.lh-billing-plan-select-indicator {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.lh-billing-plan-select-text {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.lh-billing-plan-card input[type="radio"]:checked + .lh-billing-plan-label .lh-billing-plan-select-text {
    background: #3b82f6;
    color: #ffffff;
}

.lh-billing-promo-section {
    margin: 3rem 0;
    padding: 1.5rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
}

.lh-billing-promo-section label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #374151;
    font-size: 1rem;
}

.lh-billing-promo-input-group {
    display: flex;
    gap: 0.75rem;
    max-width: 500px;
    margin: 0 auto;
    justify-content: center;
    flex-wrap: wrap;
}

.lh-billing-promo-input {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.lh-billing-promo-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.lh-billing-promo-button {
    padding: 0.75rem 1.5rem;
    background: #3b82f6;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.lh-billing-promo-button:hover {
    background: #2563eb;
}

.lh-billing-submit-section {
    margin: 2rem 0;
    text-align: center;
}

.lh-billing-submit-button {
    display: inline-block;
    padding: 1rem 3rem;
    background: #111827;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lh-billing-submit-button:hover {
    background: #1f2937;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.lh-billing-submit-button:active {
    transform: translateY(0);
}

.lh-billing-messages {
    margin: 15px 0;
}

.lh-billing-message {
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}

.lh-billing-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.lh-billing-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Account page styles */
.lh-billing-account-page {
    max-width: 900px;
    margin: 0 auto;
}

.lh-billing-subscription-status {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.lh-billing-status-active {
    color: #46b450;
    font-weight: 600;
}

.lh-billing-status-expired {
    color: #dc3232;
    font-weight: 600;
}

.lh-billing-auto-renew-on {
    color: #46b450;
}

.lh-billing-auto-renew-off {
    color: #dc3232;
}

.lh-billing-subscription-actions {
    margin-top: 15px;
}

.lh-billing-payments-history {
    margin: 30px 0;
}

.lh-billing-payments-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.lh-billing-payments-table th,
.lh-billing-payments-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.lh-billing-payments-table th {
    background: #f5f5f5;
    font-weight: 600;
}

.lh-billing-status.status-success {
    color: #46b450;
}

.lh-billing-status.status-failed {
    color: #dc3232;
}

.lh-billing-status.status-pending {
    color: #f56e28;
}

.lh-billing-discount {
    color: #46b450;
    font-size: 0.9em;
}

/* Registration, Login, Verify Email forms */
.lh-billing-register-page,
.lh-billing-login-page,
.lh-billing-verify-email-page {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

.lh-billing-register-form,
.lh-billing-login-form,
.lh-billing-verify-email-form {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.lh-billing-form-group {
    margin-bottom: 20px;
}

.lh-billing-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.lh-billing-form-group .required {
    color: #dc3232;
}

.lh-billing-form-group input[type="email"],
.lh-billing-form-group input[type="password"],
.lh-billing-form-group input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.lh-billing-form-group input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.lh-billing-form-group .description {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    display: block;
}

.lh-billing-error {
    color: #dc3232;
    font-size: 12px;
    display: block;
    margin-top: 5px;
}

.lh-billing-success {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

.lh-billing-form-footer {
    margin-top: 20px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.lh-billing-form-footer a {
    color: #2271b1;
    text-decoration: none;
}

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

.lh-billing-not-logged-in {
    text-align: center;
    padding: 40px 20px;
    max-width: 500px;
    margin: 0 auto;
}

.lh-billing-not-logged-in .lh-btn {
    margin: 5px;
}

/* Кастомные стили кнопок (без признаков WordPress) */
.lh-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
    background-color: #f3f4f6;
    color: #374151;
}

.lh-btn:hover {
    text-decoration: none;
    background-color: #e5e7eb;
    color: #111827;
}

.lh-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.lh-btn:active {
    transform: translateY(1px);
}

.lh-btn-primary {
    background-color: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
}

.lh-btn-primary:hover {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.lh-btn-primary:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.lh-btn-secondary {
    background-color: #ffffff;
    color: #374151;
    border-color: #d1d5db;
}

.lh-btn-secondary:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
    color: #111827;
}

.lh-btn-secondary:focus {
    box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.2);
}

.lh-btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Verify code input */
#verification_code {
    text-align: center;
    font-size: 24px;
    letter-spacing: 5px;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .lh-billing-subscription-page {
        padding: 1rem 0.75rem;
    }
    
    .lh-billing-plans-list {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .lh-billing-plan-label {
        padding: 1.5rem;
    }
    
    .lh-billing-plan-amount {
        font-size: 2.5rem;
    }
    
    .lh-billing-plan-currency,
    .lh-billing-plan-decimals {
        font-size: 1.25rem;
    }
    
    .lh-billing-promo-input-group {
        flex-direction: column;
    }
    
    .lh-billing-promo-input {
        width: 100%;
        min-width: auto;
    }
    
    .lh-billing-promo-button {
        width: 100%;
    }
    
    .lh-billing-submit-button {
        width: 100%;
        padding: 1rem 2rem;
    }
}

@media (max-width: 600px) {
    .lh-billing-register-page,
    .lh-billing-login-page,
    .lh-billing-verify-email-page {
        padding: 10px;
    }
    
    .lh-billing-register-form,
    .lh-billing-login-form,
    .lh-billing-verify-email-form {
        padding: 20px;
    }
}

/* Ссылка регистрации/профиля в главном меню */
nav[role="navigation"] {
    position: relative;
}

.lh-billing-menu-link,
.lh-billing-menu-register,
.lh-billing-menu-profile {
    display: inline-block;
    margin-left: 20px;
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.lh-billing-menu-link:hover,
.lh-billing-menu-register:hover,
.lh-billing-menu-profile:hover {
    color: #2271b1;
    text-decoration: underline;
}

.lh-billing-menu-register a,
.lh-billing-menu-profile a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.lh-billing-menu-register a:hover,
.lh-billing-menu-profile a:hover {
    color: #2271b1;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .lh-billing-menu-link,
    .lh-billing-menu-register,
    .lh-billing-menu-profile {
        margin-left: 10px;
        font-size: 0.9em;
    }
}

/* Debug information styles */
.lh-billing-debug {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border: 2px solid #dc3545;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    clear: both;
}

.lh-billing-debug-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.lh-billing-debug-header h4 {
    margin: 0;
    color: #dc3545;
    font-size: 14px;
    font-weight: bold;
    flex: 1;
    min-width: 200px;
}

.lh-billing-debug-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.lh-billing-debug-btn {
    padding: 6px 12px;
    background: #dc3545;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: background 0.2s;
    white-space: nowrap;
}

.lh-billing-debug-btn:hover {
    background: #c82333;
}

.lh-billing-debug-btn:active {
    background: #bd2130;
}

#lh-billing-debug-content-wrapper {
    display: block;
}

#lh-billing-debug-content-wrapper.hidden {
    display: none;
}

.lh-billing-debug pre {
    margin: 0;
    padding: 15px;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #212529;
    line-height: 1.5;
    font-family: 'Courier New', monospace;
    font-size: 11px;
}

@media (max-width: 768px) {
    .lh-billing-debug-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .lh-billing-debug-buttons {
        width: 100%;
    }
    
    .lh-billing-debug-btn {
        flex: 1;
    }
}

