/**
 * Akadverse Pro - Wishes Widget Styles
 * 
 * @package AkadversePro
 * @since 1.0.0
 */

/* ============================================================================
   Wishes Wrapper
   ========================================================================= */

.akv-wishes-wrapper {
    position: relative;
    width: 100%;
}

/* ============================================================================
   Statistics Cards
   ========================================================================= */

.akv-wishes-stats {
    display: flex;
    gap: clamp(10px, 2vw, 20px);
    margin-bottom: clamp(20px, 3vw, 30px);
    flex-wrap: wrap;
}

.akv-stat-item {
    flex: 1;
    min-width: 100px;
    text-align: center;
    padding: clamp(12px, 2vw, 20px);
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.akv-stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.akv-stat-count {
    display: block;
    font-size: clamp(20px, 4vw, 32px);
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1.2;
}

.akv-stat-label {
    display: block;
    font-size: clamp(12px, 2vw, 14px);
    opacity: 0.9;
}

/* Default colors for stats */
.akv-stat-hadir {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.akv-stat-tidak-hadir {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.akv-stat-ragu {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

/* ============================================================================
   Form Styles
   ========================================================================= */

.akv-wishes-form-wrapper {
    margin-bottom: clamp(20px, 3vw, 30px);
}

.akv-wishes-form {
    width: 100%;
}

.akv-form-field {
    margin-bottom: clamp(12px, 2vw, 16px);
}

.akv-wishes-form input[type="text"],
.akv-wishes-form textarea,
.akv-wishes-form select {
    width: 100%;
    padding: clamp(10px, 1.5vw, 14px);
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: clamp(14px, 1.5vw, 16px);
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
}

.akv-wishes-form input[type="text"]:focus,
.akv-wishes-form textarea:focus,
.akv-wishes-form select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.akv-wishes-form textarea {
    resize: vertical;
    min-height: 100px;
}

.akv-wishes-form select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

.akv-form-submit {
    text-align: center;
}

.akv-wishes-submit {
    padding: clamp(10px, 1.5vw, 14px) clamp(24px, 4vw, 40px);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: clamp(14px, 1.5vw, 16px);
    font-weight: 600;
    font-family: inherit;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.akv-wishes-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.akv-wishes-submit:active {
    transform: translateY(0);
}

.akv-wishes-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Form Messages */
.akv-form-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.akv-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.akv-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ============================================================================
   Wishes List
   ========================================================================= */

.akv-wishes-list {
    width: 100%;
}

.akv-wish-item {
    display: flex;
    gap: clamp(12px, 2vw, 16px);
    padding: clamp(12px, 2vw, 16px);
    margin-bottom: clamp(10px, 1.5vw, 15px);
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.akv-wish-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.akv-wish-avatar {
    flex-shrink: 0;
}

.akv-wish-avatar img {
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.akv-wish-content {
    flex: 1;
    min-width: 0;
}

.akv-wish-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 10px;
    flex-wrap: wrap;
}

.akv-wish-name {
    font-weight: 600;
    font-size: clamp(14px, 1.5vw, 16px);
    margin: 0;
    color: #212529;
}

.akv-wish-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.akv-wish-badge.hadir {
    background: #d4edda;
    color: #155724;
}

.akv-wish-badge.tidak_hadir {
    background: #f8d7da;
    color: #721c24;
}

.akv-wish-badge.masih_ragu {
    background: #fff3cd;
    color: #856404;
}

.akv-wish-date {
    font-size: clamp(11px, 1.2vw, 12px);
    color: #6c757d;
    white-space: nowrap;
}

.akv-wish-message {
    margin: 0;
    line-height: 1.6;
    font-size: clamp(13px, 1.4vw, 15px);
    color: #495057;
    word-wrap: break-word;
}

.akv-no-wishes {
    text-align: center;
    padding: clamp(30px, 5vw, 50px) 20px;
    color: #6c757d;
    font-size: clamp(14px, 1.5vw, 16px);
}

/* ============================================================================
   Pagination
   ========================================================================= */

.akv-wishes-pagination {
    margin-top: clamp(20px, 3vw, 30px);
    text-align: center;
}

.akv-wishes-pagination .page-numbers,
.akv-wishes-pagination .akv-page-btn {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #495057;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}

.akv-wishes-pagination .page-numbers:hover,
.akv-wishes-pagination .akv-page-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.akv-wishes-pagination .page-numbers.current,
.akv-wishes-pagination .akv-page-btn.current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: #667eea;
    cursor: default;
}

.akv-wishes-pagination .page-numbers.dots {
    border: none;
    cursor: default;
}

.akv-wishes-pagination .page-numbers.dots:hover {
    background: transparent;
}

/* ============================================================================
   Responsive Adjustments
   ========================================================================= */

@media (max-width: 768px) {
    .akv-wishes-stats {
        flex-wrap: wrap;
        /* Tetap horizontal, biarkan wrap ke bawah jika terlalu sempit */
    }
    
    .akv-stat-item {
        flex: 1 1 30%;
        min-width: 90px;
    }
    
    /* Wish item tetap horizontal (avatar kiri, konten kanan) */
    .akv-wish-item {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .akv-wish-header {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .akv-wish-badge {
        margin-left: 6px;
        margin-top: 0;
    }
}

@media (max-width: 480px) {
    .akv-wishes-pagination .page-numbers {
        padding: 6px 10px;
        font-size: 12px;
        margin: 0 2px;
    }
}

/* ============================================================================
   Dark Mode Support (Optional)
   ========================================================================= */

@media (prefers-color-scheme: dark) {
    .akv-wish-item {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .akv-wish-name {
        color: #e2e8f0;
    }
    
    .akv-wish-message {
        color: #cbd5e0;
    }
    
    .akv-wish-date {
        color: #a0aec0;
    }
    
    .akv-wishes-form input[type="text"],
    .akv-wishes-form textarea,
    .akv-wishes-form select {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
}

/* ============================================================================
   Loading State
   ========================================================================= */

.akv-wishes-loading {
    text-align: center;
    padding: 40px 20px;
}

.akv-wishes-loading::after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   akv-khitan-wishes-layout (Custom turquoise & gold wishes style)
   ========================================================================== */
.akv-khitan-wishes-layout .akv-wishes-submit {
  background: linear-gradient(135deg, #208b90 0%, #e3b15a 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(32, 139, 144, 0.25) !important;
}

.akv-khitan-wishes-layout .akv-wishes-submit:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(227, 177, 90, 0.4) !important;
}

.akv-khitan-wishes-layout .akv-wishes-form input[type="text"]:focus,
.akv-khitan-wishes-layout .akv-wishes-form textarea:focus,
.akv-khitan-wishes-layout .akv-wishes-form select:focus {
  border-color: #208b90 !important;
  box-shadow: 0 0 0 3px rgba(32, 139, 144, 0.15) !important;
}

.akv-khitan-wishes-layout .akv-wish-badge.hadir {
  background: rgba(32, 139, 144, 0.15) !important;
  color: #165a5d !important;
}

.akv-khitan-wishes-layout .akv-wish-item {
  border-left: 3px solid #208b90 !important;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(22, 90, 93, 0.03) !important;
  transition: all 0.3s ease;
}

.akv-khitan-wishes-layout .akv-wish-item:hover {
  transform: translateX(4px) !important;
  box-shadow: 0 8px 24px rgba(22, 90, 93, 0.08) !important;
  border-left-color: #e3b15a !important;
}
