/**
 * ENHANCED Frontend Styles for Smart Time Clock
 * Version: 2.0 - Modern, Clean UI
 */

/* ==========================================================================
   Main Container - Card Design
   ========================================================================== */

.stc-shortcode-timeclock {
    max-width: 500px;
    margin: 40px auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* ==========================================================================
   User Info Section
   ========================================================================== */

.stc-user-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px 30px 20px;
    text-align: center;
    color: white;
}

.stc-user-avatar {
    margin-bottom: 15px;
}

.stc-user-avatar img {
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.stc-user-details h3 {
    margin: 0 0 5px 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
}

.stc-user-email {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ==========================================================================
   Clock Display
   ========================================================================== */

.stc-shortcode-title {
    margin: 0;
    padding: 20px 30px 15px;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.3;
    color: #1f2937;
    text-align: center;
}

.stc-clock-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 30px 30px;
    text-align: center;
    color: white;
}

.stc-current-time {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 8px;
    letter-spacing: 3px;
    font-family: 'Courier New', monospace;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.stc-current-date {
    font-size: 1rem;
    opacity: 0.95;
    font-weight: 400;
}

/* ==========================================================================
   Status Sections
   ========================================================================== */

.stc-clocked-in-status,
.stc-clocked-out-status {
    padding: 30px;
}

.stc-status-indicator {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stc-status-active {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.stc-status-inactive {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #dee2e6;
}

.stc-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 10px;
    animation: pulse 2s infinite;
}

.stc-status-active .stc-status-dot {
    background: #28a745;
}

.stc-status-inactive .stc-status-dot {
    background: #6c757d;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.95); }
}

.stc-status-message {
    text-align: center;
    color: #6c757d;
    font-size: 1rem;
    margin-bottom: 25px;
}

/* ==========================================================================
   Shift Info Display
   ========================================================================== */

.stc-shift-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.stc-info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.95rem;
}

.stc-info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.stc-info-row strong {
    color: #495057;
    font-weight: 600;
}

.stc-live-duration {
    color: #28a745;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    font-size: 1.1em;
    letter-spacing: 1px;
}

/* ==========================================================================
   Form Styling
   ========================================================================== */

.stc-clock-form {
    padding: 30px;
}

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

.stc-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stc-form-group select,
.stc-form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.stc-form-group select:focus,
.stc-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.stc-form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* ==========================================================================
   Buttons - Modern Design
   ========================================================================== */

.stc-clock-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 30px 30px;
}

.stc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stc-btn-large {
    padding: 20px 32px;
    font-size: 1.1rem;
}

.stc-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.stc-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.stc-btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #dee2e6;
}

.stc-btn-secondary:hover {
    background: #e9ecef;
    border-color: #ced4da;
}

.stc-btn-icon {
    font-size: 1.3em;
    margin-right: 10px;
    opacity: 0.9;
}

.stc-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.stc-btn:active {
    transform: translateY(0);
}

/* Loading state */
.stc-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.stc-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 600px) {
    .stc-shortcode-timeclock {
        margin: 20px;
        border-radius: 15px;
    }
    
    .stc-user-info {
        padding: 20px;
    }
    
    .stc-shortcode-title {
        padding: 15px 20px 10px;
        font-size: 1.2rem;
    }

    .stc-clock-display {
        padding: 15px 20px 20px;
    }
    
    .stc-current-time {
        font-size: 2.2rem;
        letter-spacing: 2px;
    }
    
    .stc-clocked-in-status,
    .stc-clocked-out-status,
    .stc-clock-form {
        padding: 20px;
    }
    
    .stc-clock-actions {
        padding: 0 20px 20px;
    }
    
    .stc-info-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .stc-btn-large {
        padding: 16px 24px;
        font-size: 1rem;
    }
}