/* ==========================================================================
   SpotPlayer Frontend Styles - Modular & Overridable
   ========================================================================== */

/* Base Container Styles */
.spotplayer-container {
    box-sizing: border-box;
    margin: 20px 0;
}

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

.spotplayer-title {
    margin: 0;
    font-size: 1.4em;
    font-weight: 600;
    color: #333;
}

/* Badge Styles */
.spotplayer-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spotplayer-badge-success {
    background: #28a745;
    color: white;
}

.spotplayer-badge-warning {
    background: #ffc107;
    color: #212529;
}

.spotplayer-badge-error {
    background: #dc3545;
    color: white;
}

/* Message Styles */
.spotplayer-message {
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
    text-align: center;
    font-weight: 500;
}

.spotplayer-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.spotplayer-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.spotplayer-warning {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* License Card Styles */
.spotplayer-licenses-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.spotplayer-license-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.spotplayer-license-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.spotplayer-license-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 0;
    margin-bottom: 15px;
}

.spotplayer-course-title {
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
    color: #2c3e50;
    flex: 1;
}

.spotplayer-license-content {
    padding: 0 20px 20px;
}

/* Field Group Styles */
.spotplayer-field-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 15px;
}

.spotplayer-field-label {
    font-weight: 600;
    color: #555;
    min-width: 120px;
    font-size: 0.95em;
    margin: 0;
    padding-top: 5px;
}

.spotplayer-field-value {
    flex: 1;
    min-width: 0; /* Allow shrinking */
}

/* Code Display */
.spotplayer-code {
    font-family: 'Courier New', Monaco, monospace;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    font-size: 0.9em;
    word-break: break-all;
    display: block;
    line-height: 1.4;
}

.spotplayer-license-id {
    font-size: 0.85em;
}

.spotplayer-license-key {
    font-size: 0.8em;
    line-height: 1.3;
}

/* Button Styles */
.spotplayer-button {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9em;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.spotplayer-button-primary {
    background: #007cba;
    border-color: #007cba;
    color: white;
}

.spotplayer-button-primary:hover {
    background: #005a87;
    border-color: #005a87;
    color: white;
}

.spotplayer-button-link {
    background: transparent;
    border-color: #007cba;
    color: #007cba;
}

.spotplayer-button-link:hover {
    background: #007cba;
    color: white;
}

.spotplayer-button-small {
    padding: 4px 8px;
    font-size: 0.8em;
}

/* Timestamp */
.spotplayer-timestamp {
    color: #666;
    font-size: 0.9em;
}

/* Simple Layout */
.spotplayer-simple-license {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 20px;
}

.spotplayer-license-simple {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.spotplayer-field-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.spotplayer-field-name {
    font-weight: 600;
    color: #495057;
    min-width: 80px;
    font-size: 0.9em;
}

.spotplayer-field-data {
    flex: 1;
    font-size: 0.9em;
}

/* Compact Layout */
.spotplayer-compact-license {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 15px;
}

.spotplayer-license-compact {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.spotplayer-compact-header {
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

.spotplayer-compact-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.spotplayer-license-key-compact {
    flex: 1;
    min-width: 200px;
    font-size: 0.8em;
    padding: 6px 10px;
}

/* Single License Specific */
.spotplayer-single-license .spotplayer-license-card {
    border: none;
    box-shadow: none;
    background: transparent;
}

.spotplayer-single-license .spotplayer-license-content {
    padding: 0;
}

.spotplayer-course-name {
    color: #2c3e50;
    font-size: 1.1em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .spotplayer-field-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .spotplayer-field-label {
        min-width: auto;
    }

    .spotplayer-license-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .spotplayer-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .spotplayer-compact-content {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .spotplayer-license-key-compact {
        min-width: auto;
    }

    .spotplayer-field-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .spotplayer-field-name {
        min-width: auto;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .spotplayer-license-card {
        border: 2px solid;
    }

    .spotplayer-code {
        border: 1px solid;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .spotplayer-license-card {
        transition: none;
    }

    .spotplayer-button {
        transition: none;
    }
}

/* Print Styles */
@media print {
    .spotplayer-button {
        display: none;
    }

    .spotplayer-license-card {
        break-inside: avoid;
        border: 1px solid #000;
    }
}