/* UI Widget Tile CSS - WordPress Content AI */

/* ===== TILE STYLES ===== */

/* Base Tile Container */
.tile {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Tile Hover Effect */
.tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Tile Grid */
.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1rem 0;
}

/* Tile with Fixed Height */
.tile-fixed-height {
    height: 200px;
}

/* Tile with Auto Height */
.tile-auto-height {
    height: auto;
    min-height: 150px;
}

/* Tile Content */
.tile-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

/* Tile Icon */
.tile-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #3498db;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Tile Title */
.tile-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ecf0f1;
    margin-bottom: 0.5rem;
    text-align: center;
}

/* Tile Subtitle */
.tile-subtitle {
    font-size: 0.9rem;
    color: #bdc3c7;
    margin-bottom: 1rem;
    text-align: center;
    line-height: 1.4;
}

/* Tile Number */
.tile-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #3498db;
    margin-bottom: 0.5rem;
    text-align: center;
}

/* Tile Label */
.tile-label {
    font-size: 0.9rem;
    color: #bdc3c7;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tile Description */
.tile-description {
    font-size: 0.9rem;
    color: #bdc3c7;
    text-align: center;
    line-height: 1.5;
    margin-top: 1rem;
}

/* Tile Actions */
.tile-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Tile Button */
.tile-btn {
    padding: 0.5rem 1rem;
    background: rgba(52, 152, 219, 0.2);
    color: #ecf0f1;
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tile-btn:hover {
    background: rgba(52, 152, 219, 0.3);
    border-color: rgba(52, 152, 219, 0.5);
    transform: translateY(-1px);
}

/* Tile Status */
.tile-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tile-status.success {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.tile-status.warning {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
    border: 1px solid rgba(241, 196, 15, 0.3);
}

.tile-status.error {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.tile-status.info {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

/* Tile Progress */
.tile-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 1rem;
}

.tile-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Tile Loading */
.tile-loading {
    position: relative;
}

.tile-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid rgba(52, 152, 219, 0.3);
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Tile Empty State */
.tile-empty {
    text-align: center;
    padding: 2rem;
    color: #bdc3c7;
}

.tile-empty-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    opacity: 0.5;
    text-transform: uppercase;
    font-weight: bold;
}

.tile-empty h3 {
    color: #ecf0f1;
    margin-bottom: 0.5rem;
}

.tile-empty p {
    color: #bdc3c7;
}

/* Responsive Tiles */
@media (max-width: 768px) {
    .tile-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .tile {
        padding: 1rem;
        min-height: 150px;
    }
    
    .tile-icon {
        font-size: 2rem;
    }
    
    .tile-number {
        font-size: 2rem;
    }
    
    .tile-title {
        font-size: 1.1rem;
    }
    
    .tile-subtitle {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .tile {
        padding: 0.75rem;
        min-height: 120px;
    }
    
    .tile-icon {
        font-size: 1.5rem;
    }
    
    .tile-number {
        font-size: 1.75rem;
    }
    
    .tile-title {
        font-size: 1rem;
    }
    
    .tile-subtitle {
        font-size: 0.8rem;
    }
    
    .tile-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .tile-btn {
        width: 100%;
        max-width: 200px;
    }
}

/* Tile Variants */
.tile-primary {
    background: rgba(52, 152, 219, 0.1);
    border-color: rgba(52, 152, 219, 0.2);
}

.tile-primary:hover {
    background: rgba(52, 152, 219, 0.15);
    border-color: rgba(52, 152, 219, 0.3);
}

.tile-success {
    background: rgba(46, 204, 113, 0.1);
    border-color: rgba(46, 204, 113, 0.2);
}

.tile-success:hover {
    background: rgba(46, 204, 113, 0.15);
    border-color: rgba(46, 204, 113, 0.3);
}

.tile-warning {
    background: rgba(241, 196, 15, 0.1);
    border-color: rgba(241, 196, 15, 0.2);
}

.tile-warning:hover {
    background: rgba(241, 196, 15, 0.15);
    border-color: rgba(241, 196, 15, 0.3);
}

.tile-error {
    background: rgba(231, 76, 60, 0.1);
    border-color: rgba(231, 76, 60, 0.2);
}

.tile-error:hover {
    background: rgba(231, 76, 60, 0.15);
    border-color: rgba(231, 76, 60, 0.3);
}

/* Tile Sizes */
.tile-small {
    padding: 1rem;
    min-height: 120px;
}

.tile-small .tile-icon {
    font-size: 1.5rem;
}

.tile-small .tile-number {
    font-size: 1.5rem;
}

.tile-small .tile-title {
    font-size: 1rem;
}

.tile-large {
    padding: 2rem;
    min-height: 250px;
}

.tile-large .tile-icon {
    font-size: 3rem;
}

.tile-large .tile-number {
    font-size: 3rem;
}

.tile-large .tile-title {
    font-size: 1.5rem;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .tile {
        transition: none;
    }
    
    .tile:hover {
        transform: none;
    }
    
    .tile-loading::after {
        animation: none;
    }
    
    .tile-progress-bar {
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .tile {
        background: #2c3e50;
        border: 2px solid #34495e;
    }
    
    .tile:hover {
        background: #34495e;
        border-color: #3498db;
    }
    
    .tile-title {
        color: #ffffff;
    }
    
    .tile-subtitle,
    .tile-description {
        color: #ecf0f1;
    }
}
