/* Eventify Frontend Dashboard Styles */

/* Main Dashboard Container */
.eventify-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Dashboard Header */
.eventify-dashboard-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.eventify-dashboard-content {
    display: grid;
    gap: 40px; /* Increased gap between sections */
}

/* Package Information */
.eventify-package-info, 
.eventify-galleries-list, 
.eventify-quick-actions {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.package-details p {
    margin: 8px 0;
}

/* Package Usage Progress Bar */
.package-usage {
    margin: 15px 0;
}

.usage-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 600;
}

.progress-bar-wrapper {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease, background-color 0.3s ease;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.2) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.2) 75%, transparent 75%, transparent);
    background-size: 20px 20px;
    animation: progress-stripes 1s linear infinite;
}

@keyframes progress-stripes {
    0% { background-position: 0 0; }
    100% { background-position: 20px 0; }
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-active {
    background: #d4edda;
    color: #155724;
}

.badge-expired {
    background: #f8d7da;
    color: #721c24;
}

/* Alert Messages */
.alert {
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
    border-left: 4px solid;
}

.alert-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

/* Expiration Warnings */
.eventify-expiration-warnings {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.expiration-warning {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.expiration-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.expiration-warning:last-child {
    margin-bottom: 0;
}

.expired-warning {
    color: #dc3545;
    font-weight: bold;
}

.expiring-warning {
    color: #fd7e14;
    font-weight: bold;
}

.tooltip-info {
    margin-top: 10px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #007bff;
}

/* Galleries Grid */
.galleries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.gallery-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 200px; /* Reduced height for more compact cards */
}

.gallery-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0073aa, #005177);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.gallery-card:hover::before {
    transform: scaleX(1);
}

.gallery-card h4 {
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 600;
    color: #0073aa;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
    transition: color 0.3s ease;
}

.gallery-card:hover h4 {
    color: #005177;
}

.gallery-meta {
    margin-bottom: 15px;
    flex-grow: 1; /* Allow meta to grow and push buttons down */
}

.gallery-meta p {
    margin: 4px 0; /* Reduced margin for more compact look */
    font-size: 14px;
    color: #555;
}

.gallery-meta p strong {
    color: #333;
    display: inline-block;
    min-width: 100px;
    font-weight: 600;
}

/* QR Code Styles */
.gallery-qr-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.gallery-qr-section p {
    margin-bottom: 8px;
    font-size: 13px;
}

.qr-code-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.qr-code-container:hover {
    transform: scale(1.05);
}

.gallery-qr-code {
    width: 50px;
    height: 50px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.gallery-qr-code:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Gallery Actions */
.gallery-actions {
    margin-top: auto; /* Push buttons to bottom */
    padding-top: 15px;
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

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

.btn-primary {
    background: #0073aa;
    color: white;
}

.btn-primary:hover {
    background: #005177;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #1e7e34;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
    width: 100%;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-large {
    padding: 15px 30px;
    font-size: 16px;
}

/* Manual Expired Notice */
.manual-expired-notice {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    font-size: 12px;
    border: 1px solid #f5c6cb;
}

/* Quick Actions */
.eventify-quick-actions {
    margin-top: 20px; /* Additional spacing from galleries section */
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.action-card {
    display: block;
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,115,170,0.05) 0%, rgba(0,115,170,0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.action-card:hover::before {
    opacity: 1;
}

.action-card:hover {
    border-color: #0073aa;
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.action-card.action-card-primary {
    border-color: #0073aa;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.action-card.action-card-primary:hover {
    border-color: #005a87;
    background: linear-gradient(135deg, #e3f2fd 0%, #f8f9fa 100%);
}

.action-card.action-card-warning {
    border-color: #ffc107;
    background: linear-gradient(135deg, #fff3cd 0%, #ffffff 100%);
}

.action-card.action-card-warning:hover {
    border-color: #e0a800;
    background: linear-gradient(135deg, #ffeaa7 0%, #fff3cd 100%);
}

.action-card.action-card-warning .action-icon {
    background: #ffc107;
    color: #212529;
}

.action-card.action-card-warning:hover .action-icon {
    background: #e0a800;
}

.action-card.action-card-warning h4 {
    color: #856404;
}

.action-card.action-card-warning p {
    color: #6c757d;
}

.action-card.action-card-warning.loading {
    opacity: 0.8;
    cursor: not-allowed;
}

.action-card.action-card-warning.loading .action-icon {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.action-card .action-icon {
    width: 48px;
    height: 48px;
    background: #0073aa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: white;
    transition: all 0.3s ease;
}

.action-card:hover .action-icon {
    transform: scale(1.1);
    background: #005177;
}

.action-card.disabled .action-icon {
    background: #999;
}

.action-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f5f5f5;
    color: #999;
}

.action-card.disabled:hover {
    border-color: #ddd;
    background: #f5f5f5;
    transform: none;
    box-shadow: none;
}

.action-card h4 {
    margin: 0 0 10px 0;
    color: #0073aa;
    font-size: 16px;
    position: relative;
    z-index: 1;
}

.action-card.disabled h4 {
    color: #999;
}

.action-card p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state svg {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
    opacity: 0.6;
    color: #0073aa;
}

.empty-state h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 24px;
}

.empty-state p {
    margin: 0 0 20px 0;
    font-size: 16px;
}

/* Galleries Header */
.galleries-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.galleries-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.gallery-search-input,
.gallery-filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.gallery-search-input:focus,
.gallery-filter-select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.2);
}

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent;
}

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

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

/* Success/Error Messages */
.notice {
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
    border-left: 4px solid;
    animation: slideIn 0.3s ease;
}

.notice-success {
    background: #d4edda;
    color: #155724;
    border-color: #28a745;
}

.notice-error {
    background: #f8d7da;
    color: #721c24;
    border-color: #dc3545;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* No Results Message */
.no-results-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Dashboard Layout */
    .eventify-dashboard {
        padding: 15px;
    }

    .eventify-dashboard-header {
        padding: 15px;
    }

    .eventify-package-info,
    .eventify-galleries-list,
    .eventify-quick-actions {
        padding: 15px;
    }

    /* Galleries Grid */
    .galleries-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .gallery-card {
        padding: 15px;
    }

    .gallery-card h4 {
        font-size: 18px;
    }

    /* Action Buttons */
    .action-buttons {
        grid-template-columns: 1fr;
    }

    /* Quick Actions */
    .actions-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .action-card {
        padding: 15px;
    }

    .action-card .action-icon {
        width: 40px;
        height: 40px;
    }

    .action-card h4 {
        font-size: 14px;
    }

    .action-card p {
        font-size: 12px;
    }

    /* Galleries Header */
    .galleries-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .galleries-controls {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    .gallery-search-input,
    .gallery-filter-select {
        width: 95%;
    }

    /* Empty States */
    .empty-state svg {
        width: 80px;
        height: 80px;
    }

    .empty-state h4 {
        font-size: 18px;
    }

    .empty-state p {
        font-size: 14px;
    }

    /* Expiration Warnings */
    .eventify-expiration-warnings {
        padding: 15px;
    }

    .expiration-warning {
        padding: 12px;
    }

    /* Progress Bar */
    .progress-bar-wrapper {
        height: 16px;
    }

    .usage-label {
        font-size: 14px;
    }
}

/* Tablet Breakpoint */
@media (min-width: 769px) and (max-width: 1024px) {
    .galleries-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large Screens */
@media (min-width: 1200px) {
    .galleries-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .gallery-card,
    .action-card {
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    
    .gallery-card:hover,
    .action-card:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
}

/* Print Styles */
@media print {
    .gallery-actions,
    .action-buttons,
    .galleries-controls,
    .eventify-quick-actions {
        display: none;
    }
    
    .gallery-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .eventify-dashboard {
        max-width: none;
        padding: 0;
    }
}
