/**
 * Poster Lab Authentication Styles
 * Add this to your theme's CSS or enqueue it
 */

/* Auth Container */
.posterlab-auth-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #f9f9f9;
}

.posterlab-auth-box {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 450px;
    width: 100%;
    padding: 2.5rem;
}

/* Tabs */
.posterlab-auth-tabs {
    display: flex;
    border-bottom: 2px solid #e5e5e5;
    margin-bottom: 2rem;
}

.posterlab-tab {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.posterlab-tab:hover {
    color: #111;
}

.posterlab-tab.active {
    color: #111;
    border-bottom-color: #111;
}

/* Forms */
.posterlab-auth-form {
    width: 100%;
}

.posterlab-form-group {
    margin-bottom: 1.5rem;
}

.posterlab-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #111;
}

.posterlab-form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e5e5e5;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.posterlab-form-group input:focus {
    outline: none;
    border-color: #0052FF;
    box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.1);
}

/* Buttons */
.posterlab-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
}

.posterlab-btn-primary {
    background: linear-gradient(90deg, #605030 0%, #C6A665 100%);
    color: white;
    width: 100%;
}

.posterlab-btn-primary:hover {
    background: linear-gradient(90deg, #705838 0%, #D4B573 100%);
}

.posterlab-btn-secondary {
    background: #e5e5e5;
    color: #111;
}

.posterlab-btn-secondary:hover {
    background: #d5d5d5;
}

/* Logout Button - Red gradient */
#dashboard-logout,
.posterlab-btn-secondary#dashboard-logout {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 12px;
    gap: 8px;
    position: relative;
    width: 219px;
    height: 59px;
    background: linear-gradient(90deg, #FF0000 0%, #7A0000 100%);
    border: 1px solid #767676;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    border-radius: 9999px;
    font-family: 'Abhaya Libre ExtraBold', serif;
    font-style: normal;
    font-weight: 800;
    font-size: 25px;
    line-height: 150%;
    color: #FFFFFF;
    transform: rotate(0.32deg);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
}

#dashboard-logout:hover,
.posterlab-btn-secondary#dashboard-logout:hover {
    transform: rotate(0.32deg) translateY(-2px);
    box-shadow: 0px 6px 6px rgba(0, 0, 0, 0.3);
    background: linear-gradient(90deg, #FF0000 0%, #7A0000 100%);
}

#dashboard-logout:active,
#dashboard-logout:focus,
.posterlab-btn-secondary#dashboard-logout:active,
.posterlab-btn-secondary#dashboard-logout:focus {
    outline: none;
}

/* Divider */
.posterlab-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.posterlab-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e5e5;
}

.posterlab-divider span {
    background: white;
    padding: 0 1rem;
    position: relative;
    color: #888;
    font-size: 0.875rem;
}

/* OAuth Buttons */
.posterlab-oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.posterlab-oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border: 2px solid #e5e5e5;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #111;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.posterlab-oauth-btn:hover {
    background: #f9f9f9;
    border-color: #d5d5d5;
}

.posterlab-oauth-btn svg {
    width: 20px;
    height: 20px;
}

/* Messages */
.posterlab-auth-message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.posterlab-auth-message.error {
    background: #fee;
    color: #c00;
    border: 1px solid #fcc;
}

.posterlab-auth-message.success {
    background: #efe;
    color: #060;
    border: 1px solid #cfc;
}

.posterlab-auth-message.hidden {
    display: none;
}

/* Dashboard Styles */
.posterlab-dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.posterlab-dashboard {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
}

.posterlab-dashboard-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e5e5;
}

.posterlab-user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.posterlab-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0052FF;
    color: white;
    font-size: 2rem;
    font-weight: 700;
}

.posterlab-user-info h1 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.posterlab-user-email {
    color: #888;
    margin: 0;
}

.posterlab-dashboard-section {
    margin-bottom: 2rem;
}

.posterlab-dashboard-section h2 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.posterlab-credits-section {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 0.5rem;
}

.posterlab-credits-display {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.posterlab-credits-amount {
    font-size: 3rem;
    font-weight: 700;
    color: #0052FF;
}

.posterlab-credits-label {
    font-size: 1.25rem;
    color: #888;
}

.posterlab-dashboard-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.posterlab-action-card {
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 0.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    text-align: center;
}

.posterlab-action-card:hover {
    background: #e5e5e5;
    transform: translateY(-2px);
}

.posterlab-action-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.posterlab-action-card h3 {
    margin: 0.5rem 0;
    font-size: 1.125rem;
}

.posterlab-action-card p {
    margin: 0;
    color: #888;
    font-size: 0.875rem;
}

/* Favorites Styles */
.posterlab-favorites-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.posterlab-favorites-header {
    text-align: center;
    margin-bottom: 2rem;
}

.posterlab-favorites-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.posterlab-favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.posterlab-favorite-card {
    position: relative;
    aspect-ratio: 1;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.posterlab-favorite-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.posterlab-favorite-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.posterlab-favorite-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none; /* Allow clicks to pass through when invisible */
}

.posterlab-favorite-card:hover .posterlab-favorite-overlay {
    opacity: 1;
    pointer-events: auto; /* Enable clicks when visible */
}

.posterlab-favorite-view {
    padding: 0.75rem 1.5rem;
    background: white;
    color: #111;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
}

/* Image Modal */
.posterlab-image-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 2rem;
}

.posterlab-image-modal.hidden {
    display: none;
}

.posterlab-image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.posterlab-image-modal-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.posterlab-image-modal-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 0.5rem;
}

.posterlab-image-modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
}

/* Loading and Messages */
.posterlab-loading {
    text-align: center;
    padding: 3rem;
    color: #888;
}

.posterlab-favorites-message {
    text-align: center;
    padding: 3rem;
}

.posterlab-favorites-message.hidden {
    display: none;
}

/* Utility */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .posterlab-auth-box {
        padding: 1.5rem;
    }
    
    .posterlab-dashboard-header {
        flex-direction: column;
        text-align: center;
    }
    
    .posterlab-favorites-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
}

