/* Word Counter Plugin Styles */
.word-counter-container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    border: 1px solid #e0e0e0;
}

.word-counter-input-container {
    margin-bottom: 25px;
}

.word-counter-textarea {
    width: 100%;
    min-height: 200px;
    padding: 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
    background: #fafafa;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    color: #333;
}

.word-counter-textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: #ffffff;
}

.word-counter-textarea::placeholder {
    color: #999;
}

.word-counter-buttons {
    margin-bottom: 25px;
    text-align: center;
}

.word-counter-button {
    padding: 12px 28px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.3px;
}

.word-counter-clear-btn {
    background: #e74c3c;
    color: white;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.2);
}

.word-counter-clear-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.word-counter-clear-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.2);
}

.word-counter-results {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.word-counter-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    transition: transform 0.2s ease;
}

.word-counter-result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.word-counter-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.word-counter-value {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    background: #ecf0f1;
    padding: 6px 14px;
    border-radius: 20px;
    min-width: 60px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #dde1e3;
}

/* Social Media Limits Section */
.word-counter-limits-section {
    margin-top: 30px;
}

.word-counter-limits-title {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 25px;
    font-size: 22px;
    font-weight: 700;
    padding-bottom: 10px;
    border-bottom: 2px solid #ecf0f1;
}

.word-counter-limits-table-container {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 0;
    border: 1px solid #e9ecef;
    overflow-x: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.word-counter-limits-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
}

.word-counter-limits-table th {
    background: #2c3e50;
    color: white;
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
    border-bottom: 2px solid #34495e;
}

.word-counter-limits-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #ecf0f1;
    color: #2c3e50;
}

.word-counter-limits-table tr:last-child td {
    border-bottom: none;
}

.word-counter-limits-table tr:hover {
    background-color: #f8f9fa;
}

.word-counter-limits-table tr:nth-child(even) {
    background-color: #fafbfc;
}

.word-counter-limits-table tr:nth-child(even):hover {
    background-color: #f1f3f4;
}

/* Limit table specific styles */
.limit-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.limit-minmax {
    color: #7f8c8d;
    font-size: 13px;
    font-weight: 500;
}

.limit-value {
    font-weight: 700;
    color: #3498db;
    font-size: 14px;
}

.limit-type {
    color: #7f8c8d;
    font-style: italic;
    font-size: 13px;
}

.limit-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 14px;
}

.status-icon {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-pass .status-icon {
    background-color: #27ae60;
}

.status-fail .status-icon {
    background-color: #e74c3c;
}

.status-perfect .status-icon {
    background-color: #f39c12;
}

.status-pass {
    color: #27ae60;
}

.status-fail {
    color: #e74c3c;
}

.status-perfect {
    color: #f39c12;
}

.current-value {
    font-size: 12px;
    color: #7f8c8d;
    font-weight: normal;
    margin-left: 5px;
}

.word-counter-error {
    background: #ffeaea;
    color: #c0392b;
    padding: 14px;
    border-radius: 6px;
    margin-top: 15px;
    border-left: 4px solid #e74c3c;
    font-weight: 500;
    text-align: center;
    border: 1px solid #ffcdd2;
}

/* Responsive Design */
@media (max-width: 768px) {
    .word-counter-container {
        margin: 15px;
        padding: 20px;
    }
    
    .word-counter-textarea {
        min-height: 150px;
        font-size: 15px;
        padding: 14px;
    }
    
    .word-counter-results {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 15px;
    }
    
    .word-counter-result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px;
    }
    
    .word-counter-value {
        align-self: stretch;
        text-align: center;
    }
    
    .word-counter-limits-table-container {
        margin: 0 -5px;
    }
    
    .word-counter-limits-table {
        font-size: 13px;
    }
    
    .word-counter-limits-table th,
    .word-counter-limits-table td {
        padding: 10px 8px;
    }
    
    .limit-status {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .word-counter-limits-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .word-counter-container {
        padding: 15px;
        margin: 10px;
    }
    
    .word-counter-button {
        width: 100%;
        padding: 14px;
        font-size: 16px;
    }
    
    .word-counter-results {
        padding: 12px;
    }
    
    .word-counter-value {
        font-size: 16px;
        padding: 8px 12px;
    }
    
    .word-counter-label {
        font-size: 13px;
    }
    
    .word-counter-limits-table {
        font-size: 12px;
    }
    
    .word-counter-limits-table th {
        padding: 12px 6px;
        font-size: 11px;
    }
    
    .word-counter-limits-table td {
        padding: 10px 6px;
    }
}

/* Animation for value changes */
@keyframes pulse {
    0% { 
        transform: scale(1); 
        background: #ecf0f1;
    }
    50% { 
        transform: scale(1.05); 
        background: #3498db;
        color: white;
    }
    100% { 
        transform: scale(1); 
        background: #ecf0f1;
    }
}

.word-counter-value.changing {
    animation: pulse 0.5s ease;
}

/* Focus styles for accessibility */
.word-counter-button:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.word-counter-textarea:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Loading state */
.word-counter-loading {
    opacity: 0.7;
    pointer-events: none;
}

.word-counter-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}