/* Candles WordPress Plugin Styles */

/* Widget Styles */
.candles-webstream-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.candles-webstream-container h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.2em;
}

.stream-container {
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.stream-container video,
.stream-container iframe {
    width: 100%;
    height: auto;
    display: block;
}

.stream-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 60px 20px;
    font-size: 1.1em;
}

.stream-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9em;
    color: #666;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
}

.status-dot.online { background: #28a745; }
.status-dot.offline { background: #dc3545; }
.status-dot.loading { background: #ffc107; animation: pulse 1.5s infinite; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Purchase Widget Styles */
.candles-purchase-container {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.candles-purchase-container.compact-mode {
    padding: 15px;
}

.candles-grid {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.candle-item {
    text-align: center;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.candle-item:hover {
    border-color: #007cba;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.1);
}

.candle-item.selected {
    border-color: #007cba;
    background: #f0f8ff;
}

.candle-visual {
    position: relative;
    width: 40px;
    height: 60px;
    margin: 0 auto 10px;
}

.candle-base {
    width: 100%;
    height: 80%;
    background: linear-gradient(to bottom, #8B4513 0%, #A0522D 100%);
    border-radius: 0 0 4px 4px;
    position: relative;
}

.candle-flame {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 20px;
    background: radial-gradient(circle, #FFD700 0%, #FF4500 70%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flicker 1.5s ease-in-out infinite alternate;
}

@keyframes flicker {
    0% { transform: translateX(-50%) rotate(-2deg) scale(1); }
    100% { transform: translateX(-50%) rotate(2deg) scale(1.1); }
}

.candle-number {
    font-size: 0.8em;
    color: #666;
    margin-bottom: 5px;
}

.candle-select-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    cursor: pointer;
    transition: background 0.3s ease;
}

.candle-select-btn:hover {
    background: #005a87;
}

.candles-purchase-form {
    max-width: 500px;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

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

.duration-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.duration-option {
    flex: 1;
    min-width: 120px;
}

.duration-option input[type="radio"] {
    display: none;
}

.duration-label {
    display: block;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.duration-option input[type="radio"]:checked + .duration-label {
    border-color: #007cba;
    background: #f0f8ff;
    color: #007cba;
}

.duration-price {
    display: block;
    font-weight: bold;
    color: #28a745;
    margin-top: 5px;
}

.purchase-summary {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.summary-content h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.summary-line.total {
    border-top: 1px solid #ddd;
    padding-top: 10px;
    margin-top: 10px;
    font-weight: bold;
    font-size: 1.1em;
}

.purchase-btn {
    width: 100%;
    background: #28a745;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.purchase-btn:hover:not(:disabled) {
    background: #218838;
}

.purchase-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff40;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.purchase-status {
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
}

.purchase-status.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.purchase-status.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.status-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-icon {
    font-size: 1.2em;
}

.status-actions {
    margin-top: 10px;
}

.status-actions button {
    background: #007cba;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

/* Admin Styles */
.candles-admin .dashboard-section {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    margin-bottom: 20px;
    padding: 20px;
}

.candles-admin .dashboard-section h2 {
    margin-top: 0;
    border-bottom: 1px solid #e1e5e9;
    padding-bottom: 10px;
}

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

.status-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    background: #f8f9fa;
}

.status-icon {
    font-size: 2em;
    color: #007cba;
}

.status-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.1em;
}

.status-value {
    margin: 5px 0;
    font-weight: 600;
}

.status-value.success { color: #28a745; }
.status-value.error { color: #dc3545; }

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

.stat-item {
    text-align: center;
    padding: 20px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    background: #fff;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #007cba;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
}

.candles-grid-admin {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.candle-admin-item {
    text-align: center;
    padding: 15px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    background: #fff;
}

.candle-number {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
}

.candle-status .status-dot {
    width: 12px;
    height: 12px;
    margin: 5px auto;
}

.candle-status .status-dot.testing {
    background: #ffc107;
    animation: pulse 1s infinite;
}

.activity-list {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    border-bottom: 1px solid #e1e5e9;
}

.activity-time {
    font-family: monospace;
    color: #666;
    min-width: 80px;
}

.activity-content {
    flex: 1;
}

.activity-status {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
}

.status-success { background: #d4edda; color: #155724; }
.status-error { background: #f8d7da; color: #721c24; }
.status-pending { background: #fff3cd; color: #856404; }

.candles-settings-tabs .nav-tab-wrapper {
    margin-bottom: 20px;
}

.tab-content {
    display: none;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
}

.tab-content.active {
    display: block;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.status-completed { background: #d4edda; color: #155724; }
.status-badge.status-pending { background: #fff3cd; color: #856404; }
.status-badge.status-failed { background: #f8d7da; color: #721c24; }
.status-badge.status-success { background: #d4edda; color: #155724; }
.status-badge.status-error { background: #f8d7da; color: #721c24; }

/* Responsive Design */
@media (max-width: 768px) {
    .duration-options {
        flex-direction: column;
    }
    
    .duration-option {
        min-width: auto;
    }
    
    .candles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .status-cards {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .candles-grid-admin {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 480px) {
    .candles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .candles-grid-admin {
        grid-template-columns: repeat(3, 1fr);
    }
}

