/* Stripe Customer Portal Styles */

/* Container */
.scp-portal-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Header */
.scp-portal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.scp-portal-header h1 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 600;
}

.scp-user-email {
    margin: 0 0 15px 0;
    opacity: 0.9;
    font-size: 14px;
}

.scp-logout-btn {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.3s;
}

.scp-logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* Sections */
.scp-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.scp-section h2 {
    margin: 0 0 25px 0;
    font-size: 22px;
    font-weight: 600;
    color: #2d3748;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

/* No Data */
.scp-no-data {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
}

.scp-no-data p {
    margin: 0;
    font-size: 16px;
}

/* Subscription Cards */
.scp-subscriptions-list {
    display: grid;
    grid-template-columns: 1fr; /* Jedna kolona za mobilne */
    gap: 20px;
    width: 100%; /* Osiguraj da ne prelazi roditelja */
}



/* Dodatna zaštita za mobilne */
@media (max-width: 767px) {
    .scp-subscriptions-list {
        grid-template-columns: 1fr;
        max-width: 100%;
        overflow: hidden; /* Spreči prelijevanje */
    }
    
    .scp-subscriptions-list > * {
        min-width: 0; /* Resetuj min-width koji može da gura elemente van */
        max-width: 100%;
    }
}

.scp-subscription-card {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 25px;
    transition: all 0.3s;
}

.scp-subscription-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.scp-subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.scp-subscription-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}

/* Status Badges */
.scp-status {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.scp-status-active {
    background: #c6f6d5;
    color: #22543d;
}

.scp-status-canceled {
    background: #fed7d7;
    color: #742a2a;
}

.scp-status-trialing {
    background: #bee3f8;
    color: #2c5282;
}

.scp-status-past_due {
    background: #feebc8;
    color: #7c2d12;
}

.scp-status-incomplete,
.scp-status-incomplete_expired,
.scp-status-unpaid {
    background: #e2e8f0;
    color: #4a5568;
}

/* Pending Cancellation Status */
.scp-status-pending-cancel {
    background: #feebc8;
    color: #7c2d12;
}

/* Cancel Warning */
.scp-cancel-notice-row {
    background: #fef3c7;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #f59e0b;
    margin: 10px 0;
}

.scp-cancel-warning {
    color: #92400e;
    font-weight: 600;
}

/* Subscription Details */
.scp-subscription-details {
    margin-bottom: 20px;
}

.scp-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f7fafc;
}

.scp-detail-label {
    font-weight: 600;
    color: #4a5568;
    font-size: 14px;
}

.scp-detail-value {
    color: #2d3748;
    font-size: 14px;
}

/* Subscription Actions */
.scp-subscription-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

/* Buttons */
.scp-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.scp-btn-cancel {
    background: #f56565;
    color: white;
}

.scp-btn-cancel:hover {
    background: #e53e3e;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(245, 101, 101, 0.3);
}

.scp-btn-reactivate {
    background: #10b981;
    color: white;
    white-space: normal; /* Dozvoli prelamanje */
}

.scp-btn-reactivate:hover {
    background: #059669;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.scp-reactivate-notice {
    margin: 0 0 15px 0;
    color: #4a5568;
    font-size: 14px;
}

.scp-btn-download {
    background: #667eea;
    color: white;
}

.scp-btn-download:hover {
    background: #5a67d8;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.scp-btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.scp-btn-secondary:hover {
    background: #cbd5e0;
}

.scp-btn-cancel-action {
    background: #f56565;
    color: white;
}

.scp-btn-cancel-action:hover {
    background: #e53e3e;
}

/* Invoices Table */
.scp-invoices-table-wrapper {
    overflow-x: auto;
}

.scp-invoices-table {
    width: 100%;
    border-collapse: collapse;
}

.scp-invoices-table thead {
    background: #f7fafc;
}

.scp-invoices-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

.scp-invoices-table td {
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
    color: #2d3748;
    font-size: 14px;
}

.scp-invoices-table tbody tr:hover {
    background: #f7fafc;
}

/* Invoice Status */
.scp-invoice-status {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.scp-invoice-status-paid {
    background: #c6f6d5;
    color: #22543d;
}

.scp-invoice-status-open {
    background: #feebc8;
    color: #7c2d12;
}

.scp-invoice-status-void,
.scp-invoice-status-uncollectible {
    background: #fed7d7;
    color: #742a2a;
}

.scp-invoice-status-draft {
    background: #e2e8f0;
    color: #4a5568;
}

.scp-no-pdf {
    color: #a0aec0;
    font-size: 13px;
    font-style: italic;
}

/* Login Container */
.scp-login-container {
    max-width: 450px;
    margin: 60px auto;
    padding: 0 20px;
}

.scp-login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.scp-login-box h2 {
    margin: 0 0 10px 0;
    font-size: 26px;
    font-weight: 600;
    color: #2d3748;
}

.scp-login-box > p {
    margin: 0 0 25px 0;
    color: #718096;
}

.scp-login-box .login-username,
.scp-login-box .login-password,
.scp-login-box .login-remember,
.scp-login-box .login-submit {
    margin-bottom: 15px;
}

.scp-login-box label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #4a5568;
    font-size: 14px;
}

.scp-login-box input[type="text"],
.scp-login-box input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.scp-login-box input[type="text"]:focus,
.scp-login-box input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
}

.scp-login-box input[type="submit"] {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s;
}

.scp-login-box input[type="submit"]:hover {
    transform: translateY(-2px);
}

.scp-info-box {
    margin: 25px 0 0 0;
    padding: 20px;
    background: #f7fafc;
    border-left: 4px solid #667eea;
    border-radius: 6px;
}

.scp-info-box p {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #4a5568;
    line-height: 1.6;
}

.scp-info-box p:last-child {
    margin-bottom: 0;
}

.scp-info-box strong {
    color: #2d3748;
}

.scp-lost-password {
    margin: 15px 0 0 0;
    text-align: center;
    font-size: 14px;
    color: #718096;
}

.scp-lost-password a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.scp-lost-password a:hover {
    text-decoration: underline;
}

/* Error Message */
.scp-error {
    background: #fed7d7;
    color: #742a2a;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
}

.scp-no-customer {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.scp-no-customer h2 {
    margin: 0 0 15px 0;
    color: #2d3748;
}

.scp-no-customer p {
    margin: 10px 0;
    color: #718096;
}

/* Loading Overlay */
#scp-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.scp-spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Confirmation Modal */
#scp-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.scp-modal-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    max-width: 500px;
    margin: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.scp-modal-content h3 {
    margin: 0 0 15px 0;
    font-size: 22px;
    color: #2d3748;
}

.scp-modal-content p {
    margin: 10px 0;
    color: #4a5568;
}

.scp-warning {
    color: #e53e3e;
    font-weight: 600;
}

.scp-modal-actions {
    margin-top: 25px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Responsive */
@media (max-width: 768px) {
    .scp-portal-container {
        padding: 0 15px;
    }
    
    .scp-section {
        padding: 20px;
    }
    
    .scp-subscription-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .scp-invoices-table {
        font-size: 13px;
    }
    
    .scp-invoices-table th,
    .scp-invoices-table td {
        padding: 10px;
    }
    
    .scp-modal-actions {
        flex-direction: column;
    }
    
    .scp-btn {
        width: 100%;
    }
}
