/* My Account Dashboard Styles */

.my-account-dashboard {
    max-width: 1200px;
    margin: 0 auto;
}

/* Login Container for Logged Out Users */
.my-account-login {
    max-width: 500px;
    margin: 60px auto;
}

.login-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.login-container h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
}

.login-container > p {
    color: #666;
    margin-bottom: 30px;
}

.login-container form {
    text-align: left;
}

.login-container form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.login-container form input[type="text"],
.login-container form input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.login-container form input[type="text"]:focus,
.login-container form input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-container form .login-remember {
    margin-bottom: 20px;
}

.login-container form .login-remember label {
    display: inline;
    font-weight: normal;
}

.login-container form input[type="submit"] {
    width: 100%;
    padding: 14px;
    background: #667eea;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-container form input[type="submit"]:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.login-links {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 14px;
}

.login-links a {
    color: #667eea;
    text-decoration: none;
}

.login-links a:hover {
    text-decoration: underline;
}

.login-links .separator {
    margin: 0 10px;
    color: #999;
}

.account-section {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.account-section h2,
.account-section h3 {
    margin-top: 0;
    color: #333;
}

.account-section h3 {
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.account-section h3 .dashicons {
    color: #4CAF50;
    font-size: 24px;
}

/* Welcome Section */
.welcome-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    text-align: center;
    position: relative;
}

.welcome-section h2 {
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 28px;
}

.account-email {
    opacity: 0.9;
    font-size: 16px;
    margin-bottom: 20px;
}

.logout-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.logout-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.logout-button .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Subscription Status */
.subscription-status {
    border-left: 4px solid #4CAF50;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.status-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.status-item.full-width {
    grid-column: 1 / -1;
}

.status-item .label {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-item .value {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.status-item .value.active {
    color: #4CAF50;
}

.subscription-id {
    font-family: monospace;
    font-size: 14px !important;
    background: #f5f5f5;
    padding: 8px 12px;
    border-radius: 4px;
    display: inline-block;
}

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

.subscription-actions h4 {
    margin-bottom: 15px;
    color: #333;
}

.subscription-actions .button {
    margin-right: 10px;
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.button-secondary {
    background: #2271b1;
    color: #ffffff;
    border: none;
}

.button-secondary:hover {
    background: #135e96;
    color: #ffffff;
}

.button-cancel {
    background: #ffffff;
    color: #d63638;
    border: 1px solid #d63638;
}

.button-cancel:hover {
    background: #d63638;
    color: #ffffff;
}

.help-text {
    margin-top: 15px;
    padding: 12px;
    background: #f0f6fc;
    border-left: 3px solid #2271b1;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.help-text .dashicons {
    margin-top: 2px;
    color: #2271b1;
}

/* No Subscription */
.no-subscription {
    text-align: center;
    padding: 50px 30px;
    border-left: 4px solid #f59e0b;
}

.no-subscription h3 .dashicons {
    color: #f59e0b;
}

.no-subscription .button-primary {
    margin-top: 20px;
    padding: 12px 30px;
    background: #4CAF50;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
}

/* Quick Actions Grid */
.quick-actions {
    background: #f9fafb;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.action-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.action-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.action-card .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #667eea;
    margin-bottom: 15px;
}

.action-card h4 {
    margin: 10px 0;
    color: #333;
    font-size: 18px;
}

.action-card p {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.action-card .button {
    width: 100%;
    padding: 10px;
    background: #667eea;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.action-card .button:hover {
    background: #5568d3;
}

/* Recent Orders */
.orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.orders-table th,
.orders-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.orders-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #333;
}

.order-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    display: inline-block;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.status-processing {
    background: #dbeafe;
    color: #1e40af;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.button-small {
    padding: 6px 16px;
    font-size: 13px;
    background: #667eea;
    color: #ffffff;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
}

.button-small:hover {
    background: #5568d3;
}

.view-all {
    text-align: center;
    margin-top: 20px;
}

.view-all a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.form-actions .button {
    flex: 1;
    padding: 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    border: none;
}

.form-actions .button-primary {
    background: #667eea;
    color: #ffffff;
}

.form-actions .button-primary:hover {
    background: #5568d3;
}

.modal-close-btn {
    background: #e0e0e0;
    color: #333;
}

.modal-close-btn:hover {
    background: #d0d0d0;
}

.success-message {
    padding: 12px;
    background: #d1fae5;
    color: #065f46;
    border-radius: 4px;
    margin-top: 15px;
}

.error-message {
    padding: 12px;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 4px;
    margin-top: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .account-section {
        padding: 20px;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .orders-table {
        font-size: 13px;
    }
    
    .modal-content {
        padding: 25px;
        width: 95%;
    }
    
    .subscription-actions .button {
        width: 100%;
        justify-content: center;
        margin-right: 0;
    }
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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