/**
 * RWH License Manager - Frontend Styles
 * Version: 3.1.0
 */

/* License Tracker */
.rwh-license-tracker {
    max-width: 800px;
    margin: 0 auto;
}

.rwh-tracker-form .rwh-form-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rwh-license-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Monaco', 'Menlo', monospace;
}

.rwh-check-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
}

.rwh-check-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* License Card */
.rwh-license-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-top: 20px;
}

.rwh-license-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border-bottom: 1px solid #e5e7eb;
}

.rwh-license-header h3 {
    margin: 0;
    font-size: 18px;
}

.rwh-status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

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

.rwh-status-expired {
    background: #fee2e2;
    color: #991b1b;
}

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

.rwh-status-invalid {
    background: #f3f4f6;
    color: #6b7280;
}

.rwh-license-details {
    padding: 20px;
}

.rwh-detail-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

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

.rwh-detail-label {
    width: 140px;
    font-weight: 600;
    color: #4b5563;
}

.rwh-detail-value {
    flex: 1;
    color: #1f2937;
}

.rwh-never-expires {
    color: #10b981;
    font-weight: 500;
}

.rwh-expiry-date.expired {
    color: #ef4444;
}

.rwh-expiry-date.urgent {
    color: #ef4444;
    font-weight: 600;
}

.rwh-expiry-date.warning {
    color: #f59e0b;
}

.rwh-days-left {
    font-size: 11px;
    color: #6b7280;
    margin-left: 5px;
}

/* My Licenses Table */
.rwh-my-licenses {
    margin: 20px 0;
}

.rwh-section-title {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.rwh-licenses-table-wrapper {
    overflow-x: auto;
}

.rwh-licenses-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rwh-licenses-table th {
    background: #f9fafb;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

.rwh-licenses-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.rwh-licenses-table tr:hover {
    background: #f9fafb;
}

.rwh-license-key-cell {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
}

.rwh-copy-btn-small {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    margin-left: 5px;
}

.rwh-copy-btn-small:hover {
    background: #e5e7eb;
}

/* Status Dot */
.rwh-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.rwh-status-dot.rwh-status-active {
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.rwh-status-dot.rwh-status-expired {
    background: #ef4444;
}

.rwh-status-dot.rwh-status-disabled {
    background: #f59e0b;
}

.rwh-status-text {
    font-size: 13px;
}

/* View Details Button */
.rwh-view-details-btn {
    padding: 6px 12px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.rwh-view-details-btn:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

/* Progress Bar */
.rwh-progress-section {
    margin-bottom: 15px;
}

.rwh-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 5px;
    color: #6b7280;
}

.rwh-progress-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.rwh-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7c3aed, #ec4899);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Single License Status Widget */
.rwh-single-license-status {
    max-width: 500px;
    margin: 0 auto;
}

.rwh-status-widget {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.rwh-status-widget.rwh-status-active {
    border-top: 4px solid #10b981;
}

.rwh-status-widget.rwh-status-expired {
    border-top: 4px solid #ef4444;
}

.rwh-status-widget.rwh-status-disabled {
    border-top: 4px solid #f59e0b;
}

.rwh-status-widget.rwh-status-invalid {
    border-top: 4px solid #6b7280;
}

.rwh-status-header {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #f9fafb;
}

.rwh-status-icon {
    font-size: 48px;
}

.rwh-status-info h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
}

.rwh-status-badge-large {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.rwh-status-badge-large.rwh-status-active {
    background: #d1fae5;
    color: #065f46;
}

.rwh-status-badge-large.rwh-status-expired {
    background: #fee2e2;
    color: #991b1b;
}

.rwh-status-badge-large.rwh-status-disabled {
    background: #fef3c7;
    color: #92400e;
}

.rwh-status-badge-large.rwh-status-invalid {
    background: #f3f4f6;
    color: #6b7280;
}

.rwh-status-details {
    padding: 20px;
}

.rwh-expiry-section {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-top: 1px solid #e5e7eb;
}

.rwh-expiry-label {
    font-weight: 600;
    color: #6b7280;
}

.rwh-days-count {
    font-size: 12px;
    color: #6b7280;
    margin-left: 5px;
}

.rwh-expired-warning {
    color: #ef4444;
    font-weight: 500;
}

.rwh-days-badge {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 10px;
    margin-left: 5px;
}

/* Modal */
.rwh-frontend-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rwh-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.rwh-modal-container {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.rwh-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.rwh-modal-header h3 {
    margin: 0;
}

.rwh-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.rwh-modal-body {
    padding: 20px;
}

/* Empty Message */
.rwh-empty-message {
    text-align: center;
    padding: 40px;
    background: #f9fafb;
    border-radius: 12px;
    color: #6b7280;
}

/* Login Required */
.rwh-login-required {
    text-align: center;
    padding: 30px;
    background: #f9fafb;
    border-radius: 12px;
}

.rwh-login-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background: #7c3aed;
    color: white;
    text-decoration: none;
    border-radius: 8px;
}

/* Error Message */
.rwh-error-message {
    padding: 12px 16px;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 8px;
    border-left: 4px solid #ef4444;
}

/* Responsive */
@media (max-width: 768px) {
    .rwh-tracker-form .rwh-form-group {
        flex-direction: column;
    }
    
    .rwh-check-btn {
        width: 100%;
    }
    
    .rwh-detail-row {
        flex-direction: column;
    }
    
    .rwh-detail-label {
        width: auto;
        margin-bottom: 5px;
    }
    
    .rwh-licenses-table {
        font-size: 12px;
    }
    
    .rwh-licenses-table th,
    .rwh-licenses-table td {
        padding: 8px 10px;
    }
}