/* ===============================================
   Subscription Manager - Modern Design
   =============================================== */

:root {
    --primary-color: #378af1;
    --primary-hover: #4ea2ff7d;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --success-color: #10b981;
    --text-dark: #1f2937;
    --text-medium: #6b7280;
    --text-light: #9ca3af;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

* {
    box-sizing: border-box;
}

/* Container */
.subman-my-subscription {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-light);
    min-height: 100vh;
}

/* Notices */
.subman-notice {
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInDown 0.3s ease-out;
    box-shadow: var(--shadow-md);
}

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

.subman-notice::before {
    content: "";
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.subman-notice-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-right: 4px solid var(--success-color);
    color: #065f46;
}

.subman-notice-success::before {
    content: "✓";
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    font-weight: bold;
}

.subman-notice-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-right: 4px solid var(--danger-color);
    color: #991b1b;
}

.subman-notice-error::before {
    content: "✕";
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    font-weight: bold;
}

.subman-notice-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-right: 4px solid var(--warning-color);
    color: #92400e;
}

.subman-notice-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-right: 4px solid #3b82f6;
    color: #1e40af;
}

/* No Subscription Section */
.subman-no-subscription {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.subman-no-subscription h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #4ea2ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subman-no-subscription > p {
    color: var(--text-medium);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

/* Plans Grid */
.subman-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 1.5rem 0;
}

/* Plan Card */
.subman-plan {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.subman-plan::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #4ea2ff);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.subman-plan:hover::before {
    transform: scaleX(1);
}

.subman-plan:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.subman-plan-recommended {
    border-color: var(--primary-color);
    border-width: 3px;
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
}

.subman-plan-badge {
    position: absolute;
    top: -14px;
    right: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #4ea2ff 100%);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.subman-plan h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 1.5rem;
    color: var(--text-dark);
}

.subman-plan-price {
    margin-bottom: 2rem;
}

.subman-plan-price .price {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, #4ea2ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.subman-plan-price .period {
    display: block;
    font-size: 1rem;
    color: var(--text-medium);
    margin-top: 0.5rem;
    font-weight: 500;
}

.subman-plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
}

.subman-plan-features li {
    padding: 0.875rem 0;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    transition: padding 0.2s ease;
}

.subman-plan-features li:hover {
    padding-right: 0.5rem;
}

.subman-plan-features li::before {
    content: "✓";
    color: var(--success-color);
    font-weight: 700;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #d1fae5;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Subscription Info Section */
.subman-subscription-info {
    max-width: 1000px;
    margin: 0 auto;
}

.value2 {
	font-weight:bold;
}

.subman-subscription-info > h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #4ea2ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Status Card */
.subman-status-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.subman-status-header {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.subman-status-header h3 {
    margin: 0;
    font-size: 1.875rem;
    color: var(--text-dark);
    font-weight: 700;
}

/* Status Badge */
.subman-status,
.subman-status-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow-sm);
}

.subman-status-active,
.subman-status-badge.subman-status-active {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.subman-status-trial {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e3a8a;
}

.subman-status-cancelled {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.subman-status-pending_cancellation {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.subman-status-payment_failed {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

/* Details Section */
.subman-details {
    padding: 2rem;
}

.subman-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.subman-detail:hover {
    background: var(--bg-light);
    margin: 0 -2rem;
    padding: 1.25rem 2rem;
}

.subman-detail:last-child {
    border-bottom: none;
}

.subman-detail .label {
    font-weight: 600;
    color: var(--text-medium);
    font-size: 1rem;
}

.subman-detail .value {
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 600;
}

.subman-detail.subman-highlight {
    background: linear-gradient(90deg, transparent 0%, #ede9fe 100%);
    margin: 0 -2rem;
    padding: 1.25rem 2rem;
    border-radius: var(--radius-md);
}

.subman-detail.subman-highlight .value {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.125rem;
}

.subman-detail.subman-warning {
    background: linear-gradient(90deg, transparent 0%, #fef3c7 100%);
    margin: 0 -2rem;
    padding: 1.25rem 2rem;
    border-radius: var(--radius-md);
}

.subman-detail.subman-warning .value {
    color: var(--warning-color);
    font-weight: 700;
}

/* Payment Method Section */
.subman-payment-method {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.subman-payment-method h3 {
    font-size: 1.875rem;
    margin: 0 0 1.5rem;
    color: var(--text-dark);
    font-weight: 700;
}

.subman-payment-method p {
    margin: 1rem 0;
    font-size: 2rem;
    line-height: 1.6;
    color: var(--text-medium);
}

.subman-payment-method strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* Actions Section */
.subman-actions,
.subman-card-actions {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

/* Buttons */
.subman-btn,
.subman-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.subman-btn::before,
.subman-button::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.subman-btn:hover::before,
.subman-button:hover::before {
    width: 300px;
    height: 300px;
}

.subman-btn:hover,
.subman-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.2);
}

.subman-btn:active,
.subman-button:active {
    transform: translateY(0);
}

.subman-btn-primary,
.subman-button {
    background: linear-gradient(135deg, var(--primary-color) 0%, #4ea2ff 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.subman-btn-primary:hover,
.subman-button:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #4ea2ff 100%);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
    color: white;
}

.subman-btn-secondary,
.subman-button-secondary {
    background: white;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.subman-btn-secondary:hover,
.subman-button-secondary:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.subman-btn-danger,
.subman-button-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.subman-btn-danger:hover,
.subman-button-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

/* Transactions Section */
.subman-transactions {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.subman-transactions h3 {
    font-size: 1.875rem;
    margin: 0 0 1.5rem;
    color: var(--text-dark);
    font-weight: 700;
}

.subman-table,
.subman-transactions-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
}

.subman-table thead th,
.subman-transactions-table thead th {
    text-align: right;
    padding: 1rem;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    font-weight: 700;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-color);
    font-size: 1.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.subman-table thead th:first-child,
.subman-transactions-table thead th:first-child {
    border-top-right-radius: var(--radius-md);
}

.subman-table thead th:last-child,
.subman-transactions-table thead th:last-child {
    border-top-left-radius: var(--radius-md);
}

.subman-table tbody td,
.subman-transactions-table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-medium);
}

.subman-table tbody tr,
.subman-transactions-table tbody tr {
    transition: background 0.2s ease;
}

.subman-table tbody tr:hover,
.subman-transactions-table tbody tr:hover {
    background: var(--bg-light);
}

.subman-table tbody tr:last-child td,
.subman-transactions-table tbody tr:last-child td {
    border-bottom: none;
}

.subman-transaction-success {
    color: var(--success-color);
    font-weight: 700;
}

.subman-transaction-error,
.subman-transaction-failed {
    color: var(--danger-color);
    font-weight: 700;
}

.subman-transaction-pending {
    color: var(--warning-color);
    font-weight: 700;
}

/* Modal - Modern Design */
.subman-modal,
#subman-iframe-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

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

.subman-modal-content {
    background: var(--bg-white);
    margin: 5% auto;
    padding: 0;
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 900px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

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

.subman-modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #4ea2ff 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.subman-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.subman-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.subman-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.subman-modal-body {
    padding: 2rem;
}

/* Iframe Container */
#subman-tranzila-iframe {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: var(--radius-md);
}

/* Loading Spinner */
.subman-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* Utility Classes */
.subman-error {
    color: var(--danger-color);
    font-weight: 600;
    padding: 1rem;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-radius: var(--radius-md);
    border-right: 4px solid var(--danger-color);
}

.subman-no-data {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    font-style: italic;
}

.subman-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.subman-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* RTL Support */
body.rtl .subman-plan-features li::before {
    margin-left: 0.75rem;
    margin-right: 0;
}

body.rtl .subman-notice {
    border-right: none;
    border-left: 4px solid;
}

body.rtl .subman-table thead th,
body.rtl .subman-table tbody td {
    text-align: right;
}

body.rtl .subman-detail.subman-highlight,
body.rtl .subman-detail.subman-warning {
    background: linear-gradient(270deg, transparent 0%, #ede9fe 100%);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .subman-my-subscription {
        padding: 1rem;
    }

    .subman-subscription-info > h2,
    .subman-no-subscription h2 {
        font-size: 1.875rem;
    }

    .subman-plans {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .subman-status-header {
        padding: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .subman-details {
        padding: 1.5rem;
    }

    .subman-detail {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .subman-detail:hover {
        margin: 0 -1.5rem;
        padding: 1.25rem 1.5rem;
    }

    .subman-payment-method,
    .subman-transactions,
    .subman-actions {
        padding: 1.5rem;
    }

    .subman-table,
    .subman-transactions-table {
        font-size: 0.875rem;
    }

    .subman-table thead th,
    .subman-table tbody td,
    .subman-transactions-table thead th,
    .subman-transactions-table tbody td {
        padding: 0.75rem 0.5rem;
    }

    .subman-btn,
    .subman-button {
        width: 100%;
        margin: 0.5rem 0;
    }

    .subman-modal-content {
        width: 95%;
        margin: 10% auto;
    }

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

    #subman-tranzila-iframe {
        height: 500px;
    }
}

@media screen and (max-width: 480px) {
    .subman-plan-price .price {
        font-size: 2.5rem;
    }

    .subman-status-header h3 {
        font-size: 1.25rem;
    }
}