/**
 * Content Rules Tab Styles - 100% Clone
 * 
 * @package TAICS_Content_Assistant
 * @version 2.0.0
 */

/* ===== CONTENT RULES LAYOUT ===== */
.taics-content-rules-layout {
    padding: 0;
}

.taics-content-rules-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 25px;
    margin-top: 20px;
}

/* ===== BADGES ===== */
.taics-pro-badge {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-left: 6px;
}

.taics-premium-badge {
    background: linear-gradient(135deg, #ffc107, #ff8500);
    color: #333;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-left: 6px;
}

/* ===== LEFT COLUMN ===== */
.taics-content-rules-left {
    background: transparent;
}

/* Structure Name Input */
#taics-structure-name {
    background: #2c3e50;
    color: #ecf0f1;
    border: 1px solid #34495e;
    padding: 12px 15px;
    font-size: 14px;
    border-radius: 6px;
}

#taics-structure-name::placeholder {
    color: #7f8c8d;
}

/* Default Tone Select - inherits .taics-field styles from dashboard.css */

/* Article Headings List */
.taics-headings-list {
    margin-bottom: 15px;
}

.taics-heading-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    position: relative;
}

.taics-heading-number {
    color: var(--taics-text-secondary);
    font-weight: 600;
    min-width: 20px;
}

.taics-heading-input {
    flex: 1;
    background: #2c3e50;
    color: #ecf0f1;
    border: 1px solid #34495e;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
}

.taics-heading-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.taics-remove-heading {
    background: #e74c3c;
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.taics-remove-heading:hover {
    background: #c0392b;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
}

.taics-locked-icon {
    position: absolute;
    right: -25px;
    color: #7f8c8d;
    font-size: 12px;
}

.taics-add-heading-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.taics-add-heading-btn:hover {
    background: #229954;
    transform: translateY(-1px);
}

.taics-add-heading-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

/* ===== MIDDLE COLUMN ===== */
.taics-content-rules-middle {
    background: transparent;
}

/* ===== VALIDATION TOOLTIPS AND INFO MESSAGES ===== */
.validation-tooltip {
    position: absolute;
    top: -35px;
    left: 30px;
    background: #2c3e50;
    color: #ecf0f1;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border: 1px solid #34495e;
}

.validation-tooltip.show {
    opacity: 1;
}

.validation-tooltip::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #2c3e50;
}

.validation-tooltip.type-info {
    background: #3498db;
    border-color: #3498db;
}

.validation-tooltip.type-info::after {
    border-top-color: #3498db;
}

.validation-tooltip.type-success {
    background: #27ae60;
    border-color: #27ae60;
}

.validation-tooltip.type-success::after {
    border-top-color: #27ae60;
}

.validation-tooltip.type-error {
    background: #e74c3c;
    border-color: #e74c3c;
}

.validation-tooltip.type-error::after {
    border-top-color: #e74c3c;
}

.tooltip-truncate {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.www-info {
    position: absolute;
    top: -45px;
    left: 30px;
    background: #f39c12;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border: 1px solid #e67e22;
    max-width: 250px;
    white-space: normal;
    line-height: 1.3;
}

.www-info.show {
    opacity: 1;
}

.www-info::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #f39c12;
}

.www-info-icon {
    margin-right: 4px;
    font-size: 12px;
}

/* Web Sources List */
.taics-web-sources-list {
    margin-bottom: 15px;
}

.taics-web-source-item {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 8px;
    background: #34495e;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.taics-url-protocol {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 10px 12px 10px 28px;
    font-size: 13px;
    font-weight: 600;
    border-right: 1px solid #34495e;
    position: relative;
}

.taics-web-source-input {
    flex: 1;
    background: #34495e;
    color: #ecf0f1;
    border: none;
    padding: 10px 12px;
    font-size: 13px;
    outline: none;
}

.taics-web-source-input::placeholder {
    color: #7f8c8d;
}

.taics-web-source-input:focus {
    background: #3d566e;
}

.taics-web-source-input.taics-invalid-url {
    background: #4a2c2c;
    border-left: 3px solid #e74c3c;
}

.taics-remove-source {
    background: #e74c3c;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.taics-remove-source:hover {
    background: #c0392b;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
}

/* URL Validation Traffic Light */
.taics-url-status-light {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 2;
}

.taics-url-status-light.status-empty {
    background: #e74c3c;
    box-shadow: 0 0 6px rgba(231, 76, 60, 0.6);
}

.taics-url-status-light.status-typing {
    background: #f39c12;
    box-shadow: 0 0 6px rgba(243, 156, 18, 0.6);
}

.taics-url-status-light.status-valid {
    background: #27ae60;
    box-shadow: 0 0 6px rgba(39, 174, 96, 0.6);
}

.taics-add-source-btn,
.taics-check-sources-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
    margin-bottom: 10px;
}

.taics-check-sources-btn {
    background: #3498db;
}

.taics-check-sources-btn:hover {
    background: #2980b9;
}

.taics-check-sources-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

.taics-add-source-btn:hover {
    background: #229954;
    transform: translateY(-1px);
}

.taics-add-source-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

.taics-sources-notice {
    color: var(--taics-text-secondary);
    font-size: 12px;
}

.taics-warning-icon {
    color: #f39c12;
    margin-left: 8px;
    font-size: 12px;
}

/* ===== RIGHT COLUMN ===== */
.taics-content-rules-right {
    background: transparent;
}

/* Writing Guidelines */
.taics-guidelines-textarea {
    background: #34495e;
    color: #ecf0f1;
    border: 1px solid #2c3e50;
    padding: 15px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    position: relative;
}

.taics-guidelines-textarea::placeholder {
    color: #7f8c8d;
}

.taics-lock-overlay {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    color: #7f8c8d;
    font-size: 16px;
    pointer-events: none;
}

/* Character Counter */
.taics-char-counter {
    color: #7f8c8d;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

.taics-char-counter.taics-char-warning {
    color: #f39c12;
}

.taics-char-counter.taics-char-error {
    color: #e74c3c;
}

/* Structure Preview */
.taics-structure-preview {
    background: #ecf0f1;
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    padding: 15px;
    margin-top: 10px;
}

.taics-preview-header {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #bdc3c7;
}

.taics-preview-content {
    margin-bottom: 15px;
}

.taics-preview-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding: 5px 0;
}

.taics-preview-number {
    background: #3498db;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.taics-preview-text {
    color: #2c3e50;
    font-size: 13px;
    font-weight: 500;
}

.taics-preview-footer {
    border-top: 1px solid #bdc3c7;
    padding-top: 10px;
}

.taics-sources-count {
    color: #27ae60;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

#taics-sources-counter {
    background: #27ae60;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .taics-content-rules-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .taics-content-rules-right {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .taics-content-rules-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .taics-heading-item {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .taics-heading-input {
        min-width: 200px;
    }
    
    .taics-web-source-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .taics-url-protocol {
        border-right: none;
        border-bottom: 1px solid #34495e;
    }
    
    .taics-remove-source {
        width: 100%;
        height: 35px;
    }
}

@media (max-width: 480px) {
    .taics-content-rules-layout {
        padding: 15px;
    }
    
    .taics-content-rules-grid {
        gap: 15px;
    }
    
    .taics-heading-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .taics-heading-input {
        width: 100%;
        min-width: auto;
    }
    
    .taics-locked-icon {
        position: static;
        margin-top: 5px;
    }
    
    .taics-structure-preview {
        padding: 12px;
    }
}