/**
 * Shahrefarang Integration Styles
 */

:root {
    --shf-primary: #2563eb;
    --shf-primary-hover: #1d4ed8;
    --shf-secondary: #64748b;
    --shf-success: #10b981;
    --shf-danger: #ef4444;
    --shf-warning: #f59e0b;
    --shf-info: #3b82f6;
    --shf-light: #f1f5f9;
    --shf-dark: #0f172a;
    --shf-border: #e2e8f0;
    --shf-radius: 8px;
    --shf-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shf-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Container */
.shf-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Auth Box */
.shf-auth-box {
    max-width: 480px;
    margin: 4rem auto;
    background: white;
    padding: 2.5rem;
    border-radius: var(--shf-radius);
    box-shadow: var(--shf-shadow-lg);
}

.shf-auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.shf-auth-header h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 1rem 0;
}

.shf-auth-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--shf-dark);
    margin: 0 0 0.5rem 0;
}

.shf-auth-header p {
    color: var(--shf-secondary);
    margin: 0;
}

.shf-auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--shf-border);
}

.shf-auth-footer p {
    margin: 0;
    color: var(--shf-secondary);
}

.shf-auth-footer a {
    color: var(--shf-primary);
    text-decoration: none;
    font-weight: 600;
}

.shf-auth-footer a:hover {
    text-decoration: underline;
}

/* Auth Steps */
.shf-auth-step {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Verification Info */
.shf-verification-info {
    background: #f0f9ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--shf-radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.shf-info-text {
    color: #1e40af;
    font-size: 0.875rem;
    margin: 0 0 0.5rem 0;
}

.shf-email-display {
    display: block;
    color: #1e3a8a;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    word-break: break-all;
    font-weight: 600;
}

/* Code Input */
.shf-code-input {
    font-size: 1.5rem !important;
    text-align: center;
    letter-spacing: 0.5rem;
    font-family: 'Courier New', monospace !important;
    font-weight: 600;
}

/* Button Link */
.shf-btn-link {
    background: none;
    border: none;
    color: var(--shf-primary);
    cursor: pointer;
    font-size: 0.875rem;
    text-decoration: underline;
    padding: 0;
    font-weight: 500;
}

.shf-btn-link:hover {
    color: var(--shf-primary-hover);
}

.shf-btn-link:disabled {
    color: var(--shf-secondary);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Resend Section */
.shf-resend-section {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--shf-border);
}

.shf-resend-text {
    color: var(--shf-secondary);
    font-size: 0.875rem;
    margin: 0 0 0.5rem 0;
}

#shf-resend-timer {
    color: #9ca3af;
    font-size: 0.875rem;
    margin-left: 0.5rem;
}

/* Secure Text */
.shf-secure-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--shf-secondary);
    font-size: 0.75rem;
}

.shf-icon-lock {
    width: 1rem;
    height: 1rem;
    color: var(--shf-success);
}

/* Forms */
.shf-form {
    width: 100%;
}

.shf-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.shf-form-group {
    margin-bottom: 1.25rem;
}

.shf-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--shf-dark);
    font-size: 0.875rem;
}

.shf-form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--shf-border);
    border-radius: var(--shf-radius);
    font-size: 1rem;
    transition: all 0.2s;
    box-sizing: border-box;
}

.shf-form-control:focus {
    outline: none;
    border-color: var(--shf-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.shf-form-text {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    color: var(--shf-secondary);
}

/* Buttons */
.shf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--shf-radius);
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.5;
}

.shf-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.shf-btn-primary {
    background: var(--shf-primary);
    color: white;
}

.shf-btn-primary:hover:not(:disabled) {
    background: var(--shf-primary-hover);
}

.shf-btn-secondary {
    background: var(--shf-secondary);
    color: white;
}

.shf-btn-secondary:hover:not(:disabled) {
    background: #475569;
}

.shf-btn-danger {
    background: var(--shf-danger);
    color: white;
}

.shf-btn-danger:hover:not(:disabled) {
    background: #dc2626;
}

.shf-btn-block {
    width: 100%;
}

.shf-btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1.125rem;
}

.shf-btn-loader {
    display: inline-flex;
    align-items: center;
}

/* Spinner */
.shf-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: shf-spin 0.6s linear infinite;
}

@keyframes shf-spin {
    to { transform: rotate(360deg); }
}

/* Alerts */
.shf-alert {
    padding: 0.875rem;
    border-radius: var(--shf-radius);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.shf-alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.shf-alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.shf-alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.shf-alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Badge */
.shf-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.shf-badge-success {
    background: #d1fae5;
    color: #065f46;
}

.shf-badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.shf-badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.shf-badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.shf-badge-secondary {
    background: #f1f5f9;
    color: #475569;
}

/* Profile Layout */
.shf-profile-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.shf-sidebar {
    background: white;
    border-radius: var(--shf-radius);
    padding: 1.5rem;
    box-shadow: var(--shf-shadow);
    height: fit-content;
}

.shf-user-card {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--shf-border);
    margin-bottom: 1.5rem;
}

.shf-user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--shf-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.shf-user-card h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.125rem;
    color: var(--shf-dark);
}

.shf-user-card p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--shf-secondary);
}

.shf-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.shf-sidebar-nav a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: var(--shf-radius);
    color: var(--shf-dark);
    text-decoration: none;
    transition: all 0.2s;
}

.shf-sidebar-nav a:hover,
.shf-sidebar-nav a.active {
    background: var(--shf-light);
    color: var(--shf-primary);
}

.shf-profile-main {
    background: white;
    border-radius: var(--shf-radius);
    padding: 2rem;
    box-shadow: var(--shf-shadow);
}

.shf-profile-section {
    margin-bottom: 3rem;
}

.shf-profile-section:last-child {
    margin-bottom: 0;
}

.shf-profile-section h2 {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    color: var(--shf-dark);
}

/* Subscription Card */
.shf-subscription-card {
    background: var(--shf-light);
    border-radius: var(--shf-radius);
    padding: 1.5rem;
}

.shf-subscription-status {
    margin-bottom: 1rem;
}

.shf-subscription-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
}

.shf-subscription-dates {
    color: var(--shf-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.shf-no-subscription {
    text-align: center;
    padding: 2rem;
}

.shf-no-subscription p {
    color: var(--shf-secondary);
    margin-bottom: 1.5rem;
}

/* Subscription Plans */
.shf-subscriptions-header {
    text-align: center;
    margin-bottom: 3rem;
}

.shf-subscriptions-header h1 {
    font-size: 2.25rem;
    margin: 0 0 0.5rem 0;
    color: var(--shf-dark);
}

.shf-subscriptions-header p {
    font-size: 1.125rem;
    color: var(--shf-secondary);
    margin: 0;
}

.shf-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.shf-plan-card {
    background: white;
    border: 2px solid var(--shf-border);
    border-radius: var(--shf-radius);
    padding: 2rem;
    transition: all 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.shf-plan-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shf-shadow-lg);
    border-color: var(--shf-primary);
}

.shf-plan-current {
    border-color: var(--shf-primary);
    border-width: 2px;
}

.shf-plan-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--shf-primary);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: var(--shf-radius);
    font-size: 0.75rem;
    font-weight: 600;
}

.shf-plan-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    color: var(--shf-dark);
}

.shf-plan-description {
    color: var(--shf-secondary);
    margin: 0;
    font-size: 0.875rem;
}

.shf-plan-pricing {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--shf-border);
    margin-bottom: 1.5rem;
}

.shf-plan-price {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.shf-price-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--shf-dark);
}

.shf-price-period {
    font-size: 1rem;
    color: var(--shf-secondary);
}

.shf-plan-yearly {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--shf-secondary);
}

.shf-plan-features {
    flex: 1;
    margin-bottom: 1.5rem;
}

.shf-plan-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.shf-plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--shf-dark);
}

.shf-icon-check {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--shf-success);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.shf-plan-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Payment Result */
.shf-payment-result {
    max-width: 500px;
    margin: 4rem auto;
    text-align: center;
    background: white;
    padding: 3rem;
    border-radius: var(--shf-radius);
    box-shadow: var(--shf-shadow-lg);
}

.shf-payment-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shf-payment-icon svg {
    width: 48px;
    height: 48px;
}

.shf-payment-success {
    background: #d1fae5;
    color: #065f46;
}

.shf-payment-failed {
    background: #fee2e2;
    color: #991b1b;
}

.shf-payment-result h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    color: var(--shf-dark);
}

.shf-payment-result p {
    color: var(--shf-secondary);
    margin: 0 0 1.5rem 0;
}

.shf-payment-id {
    font-size: 0.875rem;
    color: var(--shf-secondary);
    font-family: monospace;
}

.shf-payment-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Checkout */
.shf-checkout-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.shf-checkout-main,
.shf-checkout-sidebar {
    background: white;
    border-radius: var(--shf-radius);
    padding: 2rem;
    box-shadow: var(--shf-shadow);
}

.shf-checkout-summary {
    background: var(--shf-light);
    border-radius: var(--shf-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.shf-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.shf-summary-item:not(:last-child) {
    border-bottom: 1px solid var(--shf-border);
}

.shf-summary-total {
    font-size: 1.25rem;
    font-weight: 700;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 2px solid var(--shf-border) !important;
}

.shf-plan-preview h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
}

.shf-plan-preview p {
    color: var(--shf-secondary);
    margin: 0 0 1.5rem 0;
}

.shf-plan-features-list {
    list-style: disc;
    padding-left: 1.5rem;
    margin: 0;
}

.shf-plan-features-list li {
    padding: 0.375rem 0;
    color: var(--shf-dark);
}

/* Responsive */
@media (max-width: 768px) {
    .shf-form-row {
        grid-template-columns: 1fr;
    }
    
    .shf-profile-layout,
    .shf-checkout-layout {
        grid-template-columns: 1fr;
    }
    
    .shf-plans-grid {
        grid-template-columns: 1fr;
    }
    
    .shf-payment-actions {
        flex-direction: column;
    }
}

