/**
 * Customer Subscription Management Styles
 *
 * Styles for the subscription management section in My Account.
 * Matches Go Troppo website design patterns.
 *
 * @package VocusOrderProcessor
 * @since 2.4.0
 */

/* ==========================================================================
   Section Container
   ========================================================================== */

.vop-subscription-management {
    margin: 30px 0;
    font-family: inherit;
}

.vop-section-header {
    margin-bottom: 24px;
}

.vop-section-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 8px 0;
}

.vop-section-intro {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

/* ==========================================================================
   Service Selector
   ========================================================================== */

.vop-subscription-selector {
    margin-bottom: 24px;
}

.vop-subscription-selector label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.vop-subscription-selector .vop-select {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #fff;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
}

.vop-subscription-selector .vop-select:focus {
    outline: none;
    border-color: #00b4d8;
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.1);
}

/* ==========================================================================
   Subscription Card
   ========================================================================== */

.vop-subscription-card,
.vop-cancellation-status-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.vop-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e5e5;
}

.vop-card-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
}

.vop-card-body {
    padding: 20px;
}

/* ==========================================================================
   Status Badges
   ========================================================================== */

.vop-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vop-status-active {
    background: #d4edda;
    color: #155724;
}

.vop-status-pending {
    background: #fff3cd;
    color: #856404;
}

.vop-status-cancelled,
.vop-status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.vop-status-processed {
    background: #cce5ff;
    color: #004085;
}

/* ==========================================================================
   Details Grid
   ========================================================================== */

.vop-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 600px) {
    .vop-details-grid {
        grid-template-columns: 1fr;
    }
}

.vop-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vop-detail-item.vop-detail-full {
    grid-column: 1 / -1;
}

.vop-detail-label {
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vop-detail-value {
    font-size: 1rem;
    color: #1a1a2e;
    font-weight: 500;
}

/* Loading placeholder animation */
.vop-loading-placeholder {
    display: inline-block;
    height: 1.2em;
    width: 120px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: vop-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes vop-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ==========================================================================
   Action Buttons
   ========================================================================== */

.vop-subscription-actions {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
}

.vop-subscription-actions h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 16px 0;
}

.vop-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.vop-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.vop-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.vop-btn-primary {
    background: #00b4d8;
    color: #fff;
}

.vop-btn-primary:hover {
    background: #0096c7;
}

.vop-btn-secondary {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
}

.vop-btn-secondary:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.vop-btn-danger {
    background: #dc3545;
    color: #fff;
}

.vop-btn-danger:hover {
    background: #c82333;
}

.vop-btn-disabled,
.vop-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.vop-btn-disabled:hover,
.vop-btn:disabled:hover {
    background: inherit;
}

.vop-action-note {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* ==========================================================================
   Modal Styles
   ========================================================================== */

.vop-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.vop-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.vop-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.vop-modal-small {
    max-width: 380px;
}

.vop-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #666;
    z-index: 1;
}

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

.vop-modal-close .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.vop-modal-header {
    padding: 24px 24px 0;
}

.vop-modal-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
    padding-right: 32px;
}

.vop-modal-body {
    padding: 24px;
}

.vop-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px 24px;
    border-top: 1px solid #e5e5e5;
}

/* Prevent body scroll when modal open */
body.vop-modal-open {
    overflow: hidden;
}

/* ==========================================================================
   Cancellation Form
   ========================================================================== */

.vop-cancellation-warning {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #fff3cd;
    border-radius: 8px;
    margin-bottom: 24px;
}

.vop-cancellation-warning .dashicons {
    color: #856404;
    font-size: 24px;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.vop-cancellation-warning p {
    margin: 0;
    color: #856404;
    font-size: 0.95rem;
    line-height: 1.5;
}

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

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

.vop-form-group label .required {
    color: #dc3545;
}

.vop-form-group select,
.vop-form-group textarea,
.vop-form-group input[type="date"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.vop-form-group select:focus,
.vop-form-group textarea:focus,
.vop-form-group input[type="date"]:focus {
    outline: none;
    border-color: #00b4d8;
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.1);
}

.vop-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.vop-form-help {
    font-size: 0.85rem;
    color: #666;
    margin: 8px 0 0;
}

.vop-form-checkbox {
    display: flex;
    align-items: flex-start;
}

.vop-form-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: normal;
    cursor: pointer;
}

.vop-form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

/* ==========================================================================
   Success Modal
   ========================================================================== */

.vop-text-center {
    text-align: center;
}

.vop-success-icon {
    margin-bottom: 16px;
}

.vop-success-icon .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    color: #28a745;
}

#vop-success-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 12px 0;
}

#vop-success-message {
    color: #666;
    margin: 0 0 24px 0;
    line-height: 1.6;
}

/* ==========================================================================
   Cancellation Status Card
   ========================================================================== */

.vop-cancellation-status-card .vop-card-body {
    text-align: center;
}

#vop-cancellation-message {
    color: #666;
    margin: 0 0 12px 0;
}

.vop-cancellation-details {
    font-size: 0.9rem;
    color: #888;
}

/* ==========================================================================
   No Services Message
   ========================================================================== */

.vop-no-services {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.vop-no-services p {
    color: #666;
    margin: 0;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 480px) {
    .vop-modal-content {
        margin: 0;
        border-radius: 16px 16px 0 0;
        max-height: 95vh;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
    }

    .vop-action-buttons {
        flex-direction: column;
    }

    .vop-btn {
        justify-content: center;
    }

    .vop-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .vop-modal-footer {
        flex-direction: column-reverse;
    }

    .vop-modal-footer .vop-btn {
        width: 100%;
        justify-content: center;
    }
}
