/* Photo Marketplace - Frontend Styles */

/* Gallery */
.lpm-photo-gallery {
    margin: 2rem 0;
}

.lpm-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.lpm-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.lpm-gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.lpm-gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.lpm-gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.lpm-gallery-item:hover .lpm-gallery-overlay {
    transform: translateY(0);
}

.lpm-gallery-overlay h3 {
    margin: 0;
    font-size: 1.1rem;
}

/* Registration Form */
.lpm-registration-form,
.lpm-upload-form-wrapper {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.lpm-form-row {
    margin-bottom: 1.5rem;
}

.lpm-form-row label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.lpm-form-row input[type="text"],
.lpm-form-row input[type="email"],
.lpm-form-row input[type="password"],
.lpm-form-row input[type="number"],
.lpm-form-row textarea,
.lpm-form-row select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.lpm-form-row input[type="file"] {
    padding: 0.5rem 0;
}

.lpm-help-text {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
}

.lpm-submit-btn {
    background: #0073aa;
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.lpm-submit-btn:hover {
    background: #005a87;
}

.lpm-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Upload Area */
.lpm-upload-area {
    position: relative;
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.lpm-upload-area:hover {
    border-color: #0073aa;
}

.lpm-upload-area input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
}

.lpm-upload-placeholder .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #0073aa;
}

/* Pricing Grid */
.lpm-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.lpm-price-item {
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 4px;
}

.lpm-price-item label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.lpm-price-item input {
    width: calc(100% - 30px);
    margin-right: 5px;
}

/* Messages */
.lpm-form-messages p.success {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
}

.lpm-form-messages p.error {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
}

/* Customer Library */
.lpm-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.lpm-library-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.lpm-library-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.lpm-library-info {
    padding: 1.5rem;
}

.lpm-library-info h3 {
    margin: 0 0 0.5rem 0;
}

.lpm-library-info .lpm-variation {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.lpm-library-info .lpm-purchase-date {
    color: #999;
    font-size: 0.85rem;
}

.lpm-download-btn {
    display: inline-block;
    margin-top: 1rem;
    background: #0073aa;
    color: white !important;
    padding: 0.5rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.lpm-download-btn:hover {
    background: #005a87;
}

.lpm-limit-reached {
    color: #dc3545;
    font-weight: 600;
    margin-top: 1rem;
}

/* Photographer Dashboard */
.lpm-photographer-dashboard {
    padding: 2rem;
}

.lpm-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.lpm-stat-box {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.lpm-stat-box h3 {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #666;
}

.lpm-stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #0073aa;
    margin: 0;
}

.lpm-dashboard-actions {
    margin: 2rem 0;
}

/* Protected Images */
.lpm-protected-image {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    pointer-events: none;
}

/* WooCommerce Login Button — Black style */
.woocommerce-form-login .woocommerce-button,
.woocommerce form.woocommerce-form-login button[type="submit"],
.woocommerce-form-login__submit {
    background-color: #000 !important;
    color: #fff !important;
    border-color: #000 !important;
}
.woocommerce-form-login .woocommerce-button:hover,
.woocommerce form.woocommerce-form-login button[type="submit"]:hover,
.woocommerce-form-login__submit:hover {
    background-color: #333 !important;
    border-color: #333 !important;
}

/* =========================================================================
 * LPM DESIGN SYSTEM (UI Unification)
 * ========================================================================= */

.lpm-modern-ui {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #334155;
    line-height: 1.6;
}

/* Cards */
.lpm-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    margin-bottom: 24px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.lpm-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
}

.lpm-card-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.lpm-card-header h2, .lpm-card-header h3, .lpm-card-header h4 {
    margin: 0;
    color: #0f172a;
    font-weight: 600;
}

.lpm-card-body {
    padding: 24px;
}

.lpm-card-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 16px 24px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

/* Grids */
.lpm-grid {
    display: grid;
    gap: 20px;
}

.lpm-grid-2 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.lpm-grid-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.lpm-grid-4 { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

/* Buttons */
.lpm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    line-height: 1.2;
}

.lpm-btn:disabled, .lpm-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.lpm-btn-primary {
    background: #4f46e5;
    color: #ffffff !important;
    border-color: #4f46e5;
}

.lpm-btn-primary:hover {
    background: #4338ca;
    color: #ffffff !important;
}

.lpm-btn-secondary {
    background: #f1f5f9;
    color: #475569 !important;
    border-color: #cbd5e1;
}

.lpm-btn-secondary:hover {
    background: #e2e8f0;
    color: #334155 !important;
}

.lpm-btn-danger {
    background: #fef2f2;
    color: #dc2626 !important;
    border-color: #fca5a5;
}

.lpm-btn-danger:hover {
    background: #fee2e2;
    color: #b91c1c !important;
}

.lpm-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

/* Badges */
.lpm-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.lpm-badge-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.lpm-badge-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.lpm-badge-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.lpm-badge-info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.lpm-badge-muted { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

/* Forms */
.lpm-form-group {
    margin-bottom: 20px;
}

.lpm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #334155;
    font-size: 14px;
}

.lpm-input-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    color: #0f172a;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #ffffff;
    box-sizing: border-box;
}

.lpm-input-control:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.lpm-input-control[type="file"] {
    padding: 8px 10px;
}

/* Alerts */
.lpm-alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.lpm-alert-info { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.lpm-alert-success { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.lpm-alert-warning { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.lpm-alert-danger { background: #fef2f2; color: #b91c1c; border-color: #fca5a5; }

/* Dashboard Headers */
.lpm-dashboard-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 12px;
    padding: 30px;
    color: #ffffff;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.lpm-dashboard-header h1, .lpm-dashboard-header h2 {
    color: #ffffff !important;
    margin: 0;
    font-size: 24px;
}

.lpm-dashboard-header p {
    color: #94a3b8;
    margin: 5px 0 0 0;
}

/* Typography Utilities */
.lpm-text-center { text-align: center; }
.lpm-text-muted { color: #64748b; }
.lpm-font-bold { font-weight: 600; }
.lpm-mb-0 { margin-bottom: 0 !important; }
.lpm-mt-4 { margin-top: 1.5rem !important; }
.lpm-mb-4 { margin-bottom: 1.5rem !important; }

.lpm-dashboard-header-title {
    color: #ffffff !important;
}