/**
 * Photographer Frontend Profile - Public Styles
 * 
 * Styles for the front-end profile editor and public profile display
 * 
 * @package Photographer_Frontend_Profile
 * @since 1.0.0
 */

/* ==========================================================================
   Profile Editor Container
   ========================================================================== */

.pfp-editor-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
}

.pfp-editor-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e5e5;
}

.pfp-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.pfp-editor-header h2 {
    color: #333;
    font-size: 2.5em;
    margin: 0;
    font-weight: 300;
}

/* ==========================================================================
   Points Display
   ========================================================================== */

.pfp-points-display {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.pfp-points-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pfp-points-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 215, 0, 0.4);
}

.pfp-points-icon {
    font-size: 1.2em;
}

.pfp-points-label {
    font-size: 0.9em;
    color: #666;
}

.pfp-points-value {
    font-size: 1.3em;
    color: #333;
    font-weight: 700;
}

/* ==========================================================================
   Tier Badges
   ========================================================================== */

.pfp-tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 5px 5px 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pfp-tier-badge:hover {
    transform: translateY(-1px);
}

/* Tier-specific colors */
.pfp-tier-explorer {
    background: linear-gradient(135deg, #95A5A6 0%, #BDC3C7 100%);
    color: #2C3E50;
    box-shadow: 0 2px 4px rgba(149, 165, 166, 0.3);
}

.pfp-tier-contributor {
    background: linear-gradient(135deg, #3498DB 0%, #5DADE2 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}

.pfp-tier-curator {
    background: linear-gradient(135deg, #9B59B6 0%, #BB8FCE 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(155, 89, 182, 0.3);
}

.pfp-tier-ambassador {
    background: linear-gradient(135deg, #E67E22 0%, #F39C12 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(230, 126, 34, 0.3);
}

.pfp-tier-luminary {
    background: linear-gradient(135deg, #E74C3C 0%, #F1948A 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
}

/* Activity Points Display */
.pfp-activity-points {
    color: #27AE60;
    font-weight: 600;
}

/* Small tier badge for social settings */
.pfp-tier-badge-small {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-right: 8px;
}

/* Tier-based social info styling */
.pfp-tier-social-info {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #2271b1;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.pfp-social-counter {
    background: #fff;
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: 600;
    color: #333;
    border: 2px solid #2271b1;
}

.pfp-tier-upgrade-hint {
    display: block;
    color: #666;
    font-style: italic;
    margin-top: 5px;
    flex-basis: 100%;
}

/* Active Social Links Slots */
.pfp-active-social-container {
    margin-bottom: 30px;
}

.pfp-active-social-container h4 {
    color: #333;
    font-size: 1.2em;
    margin-bottom: 15px;
    border-bottom: 2px solid #e5e5e5;
    padding-bottom: 8px;
}

.pfp-active-social-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 2px dashed #ccc;
    min-height: 120px;
}

.pfp-social-slot {
    background: #fff;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 15px;
    min-height: 80px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
}

.pfp-slot-empty {
    border-style: dashed;
    background: #fafafa;
}

.pfp-slot-filled {
    border-color: #2271b1;
    background: #fff;
}

.pfp-slot-placeholder {
    text-align: center;
    color: #999;
    font-style: italic;
    width: 100%;
}

.pfp-social-field-active {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.pfp-social-field-active .pfp-social-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 50%;
}

.pfp-social-field-active .pfp-social-input {
    flex: 1;
}

.pfp-social-field-active .pfp-social-input label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    font-size: 0.9em;
}

.pfp-social-field-active .pfp-social-input input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9em;
}

.pfp-remove-social {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pfp-remove-social:hover {
    background: #c82333;
}

/* Available Social Platforms */
.pfp-available-social-container {
    margin-bottom: 30px;
}

.pfp-available-social-container h4 {
    color: #333;
    font-size: 1.2em;
    margin-bottom: 15px;
    border-bottom: 2px solid #e5e5e5;
    padding-bottom: 8px;
}

.pfp-available-social-platforms {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    padding: 15px;
    background: #f0f8ff;
    border-radius: 8px;
    border: 1px solid #d0e7ff;
}

.pfp-social-platform-available {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 12px;
    cursor: grab;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    user-select: none;
}

.pfp-social-platform-available:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 4px rgba(34, 113, 177, 0.2);
    transform: translateY(-1px);
}

.pfp-social-platform-available:active,
.pfp-social-platform-available.pfp-dragging {
    cursor: grabbing;
    opacity: 0.8;
    transform: rotate(2deg);
}

.pfp-social-platform-available .pfp-social-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pfp-platform-name {
    flex: 1;
    font-weight: 600;
    color: #333;
}

.pfp-drag-handle {
    color: #999;
    font-size: 12px;
    cursor: grab;
}

/* Drag and Drop States */
.pfp-social-slot.pfp-drag-over {
    border-color: #2271b1;
    background: #e3f2fd;
    transform: scale(1.02);
}

.pfp-social-slot.pfp-slot-empty.pfp-drag-over {
    border-style: solid;
    background: #e8f5e8;
}

.pfp-social-platform-available.pfp-dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .pfp-tier-social-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .pfp-active-social-slots {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .pfp-available-social-platforms {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 8px;
    }
    
    .pfp-social-field-active {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .pfp-social-field-active .pfp-social-input {
        min-width: 200px;
    }
}

/* PRK-007: compact, keyboard/touch-friendly profile social selector. */
#pfp-section-social .pfp-active-social-slots {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 8px;
    padding: 10px;
    border-width: 1px;
    min-height: 0;
}
#pfp-section-social .pfp-social-slot {
    min-width: 0;
    min-height: 64px;
    padding: 8px;
    border-width: 1px;
}
#pfp-section-social .pfp-social-field-active { flex-wrap: nowrap; gap: 8px; }
#pfp-section-social .pfp-social-input { min-width: 0; }
#pfp-section-social .pfp-social-input input { box-sizing: border-box; min-width: 0; }
#pfp-section-social .pfp-remove-social { width: 36px; height: 36px; }
#pfp-section-social .pfp-available-social-platforms {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    padding: 8px;
    gap: 6px;
}
#pfp-section-social .pfp-social-platform-available {
    min-width: 0;
    min-height: 44px;
    padding: 8px;
    gap: 6px;
    font: inherit;
    text-align: left;
    color: #333;
}
#pfp-section-social .pfp-social-platform-available[hidden] { display: none !important; }
#pfp-section-social .pfp-platform-name { overflow-wrap: anywhere; font-size: .9em; }
#pfp-section-social button:focus-visible { outline: 2px solid #2271b1; outline-offset: 2px; }
#pfp-section-social .pfp-social-status { margin: 8px 0; font-size: .9em; }
#pfp-section-social .pfp-active-social-container h4,
#pfp-section-social .pfp-available-social-container h4 { border-bottom-width: 1px; margin-bottom: 8px; }
@media (max-width: 768px) {
    #pfp-section-social .pfp-section-content { padding: 12px; }
    #pfp-section-social .pfp-section-title { padding: 12px; gap: 8px; }
    #pfp-section-social .pfp-section-explanation { padding: 10px; border-left-width: 2px; }
    #pfp-section-social .pfp-active-social-slots { grid-template-columns: 1fr; }
    #pfp-section-social .pfp-available-social-platforms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #pfp-section-social .pfp-drag-handle { display: none; }
    #pfp-section-social .pfp-social-field-active .pfp-social-icon { width: 24px; height: 24px; }
}

/* ==========================================================================
   Publicity Settings
   ========================================================================== */

.pfp-settings-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.pfp-settings-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e5e5;
}

.pfp-settings-header h2 {
    color: #333;
    font-size: 2.2em;
    margin: 0 0 15px 0;
    font-weight: 300;
}

.pfp-settings-description {
    color: #666;
    font-size: 1.1em;
    line-height: 1.6;
    margin: 0;
}

.pfp-settings-section {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pfp-settings-section h3 {
    color: #333;
    font-size: 1.4em;
    margin: 0 0 25px 0;
    font-weight: 500;
}

/* Checkbox Styling */
.pfp-checkbox-field {
    margin-bottom: 25px;
}

.pfp-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 15px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.pfp-checkbox-label:hover {
    border-color: #667eea;
    background-color: #f8f9ff;
}

.pfp-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.pfp-checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: white;
    flex-shrink: 0;
    position: relative;
    transition: all 0.3s ease;
}

.pfp-checkbox-label input[type="checkbox"]:checked + .pfp-checkbox-custom {
    background: #667eea;
    border-color: #667eea;
}

.pfp-checkbox-label input[type="checkbox"]:checked + .pfp-checkbox-custom::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.pfp-checkbox-text {
    flex: 1;
}

.pfp-checkbox-text strong {
    display: block;
    color: #333;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.pfp-checkbox-text small {
    color: #666;
    line-height: 1.4;
}

/* Info Box */
.pfp-settings-info {
    margin-top: 30px;
}

.pfp-info-box {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 25px;
}

.pfp-info-box h4 {
    color: #495057;
    font-size: 1.2em;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.pfp-info-box ul {
    margin: 0;
    padding-left: 20px;
}

.pfp-info-box li {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 8px;
}

.pfp-info-box li:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Progress Bar
   ========================================================================== */

.pfp-completion-meter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.pfp-progress-bar {
    width: 200px;
    height: 10px;
    background-color: #e5e5e5;
    border-radius: 5px;
    overflow: hidden;
}

.pfp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 5px;
    transition: width 0.3s ease;
}

.pfp-completion-percent {
    font-weight: 600;
    color: #4CAF50;
    font-size: 1.1em;
}

/* ==========================================================================
   Section Styling
   ========================================================================== */

.pfp-editor-section {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.pfp-section-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 25px;
    margin: 0;
    font-size: 1.3em;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 15px;
}

.pfp-section-number {
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1em;
}

.pfp-section-content {
    padding: 30px 25px;
}

/* Section explanations for clarity */
.pfp-section-explanation {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
    border-left: 4px solid #0073aa;
}

.pfp-section-explanation p {
    margin: 0 0 8px 0;
    line-height: 1.5;
    color: #555;
}

.pfp-section-explanation p:last-child {
    margin-bottom: 0;
}

.pfp-section-explanation strong {
    color: #0073aa;
    font-weight: 600;
}

/* Points system explanation styling */
.pfp-points-explanation {
    margin-bottom: 25px;
}

.pfp-points-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.pfp-points-breakdown-item {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
}

.pfp-tier-progression {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.pfp-tier-progression small {
    color: #666;
    font-style: italic;
}

/* Virtual gallery tier limits styling */
.pfp-virtual-gallery-limit-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
    border-left: 4px solid #28a745;
}

.pfp-tier-gallery-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.pfp-gallery-counter {
    font-weight: 600;
    color: #28a745;
}

.pfp-virtual-gallery-limit-info .pfp-tier-upgrade-hint {
    flex-basis: 100%;
    margin-top: 8px;
    color: #666;
    font-size: 13px;
}

.pfp-virtual-gallery-limit-info .pfp-tier-progression {
    flex-basis: 100%;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #ddd;
}

/* Worldly.Photos field styling */
.pfp-worldly-photos-field {
    background: #f0f8ff;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 20px;
    margin-top: 25px;
    border-left: 4px solid #007cba;
}

.pfp-worldly-photos-field label {
    color: #007cba;
    font-weight: 600;
    font-size: 16px;
}

.pfp-worldly-photos-field input[type="url"] {
    border-color: #b3d9ff;
    background: #ffffff;
}

.pfp-worldly-photos-field input[type="url"]:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.pfp-worldly-photos-field .pfp-section-explanation {
    background: #ffffff;
    border-color: #b3d9ff;
    border-left-color: #007cba;
}

/* ==========================================================================
   Form Fields
   ========================================================================== */

.pfp-field {
    margin-bottom: 25px;
}

.pfp-field-group {
    display: flex;
    gap: 20px;
}

.pfp-field-group-two-cols .pfp-field {
    flex: 1;
}

.pfp-field label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.pfp-field input[type="text"],
.pfp-field input[type="email"],
.pfp-field input[type="url"],
.pfp-field textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.pfp-field input:focus,
.pfp-field textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.pfp-field input:disabled,
.pfp-field input[readonly] {
    background-color: #f5f5f5;
    color: #666;
    cursor: not-allowed;
}

.pfp-field-note {
    display: block;
    color: #666;
    font-size: 0.85em;
    margin-top: 5px;
    font-style: italic;
}

.pfp-disabled-note {
    color: #e74c3c;
}

/* ==========================================================================
   Role Badges
   ========================================================================== */

.pfp-role-badges {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

.pfp-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 500;
    margin-left: 8px;
}

.pfp-badge-happyshuttercount {
    background: #e3f2fd;
    color: #1976d2;
}

.pfp-badge-premiumshuttercount {
    background: #f3e5f5;
    color: #7b1fa2;
}

.pfp-badge-photoresk-event-organiser {
    background: #e8f5e8;
    color: #388e3c;
}

.pfp-badge-premium {
    background: #fff3e0;
    color: #f57c00;
}

.pfp-badge-organiser {
    background: #e8f5e8;
    color: #388e3c;
}

/* ==========================================================================
   Social Media Fields
   ========================================================================== */

.pfp-social-limit-info {
    background: #e3f2fd;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    color: #1976d2;
    font-size: 0.9em;
}

.pfp-social-fields {
    display: grid;
    gap: 15px;
}

.pfp-social-field {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.pfp-social-field:hover {
    background-color: #f8f9fa;
}

.pfp-social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #667eea;
    color: white;
    border-radius: 6px;
    font-size: 1.2em;
}

.pfp-social-input {
    flex: 1;
    width: 100%;
}

.pfp-social-input label {
    margin-bottom: 5px;
    font-size: 0.9em;
}

.pfp-social-input input {
    margin-bottom: 0;
    width: 100%;
}

.pfp-social-preview {
    margin-left: auto;
}

.pfp-social-preview a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9em;
    padding: 5px 10px;
    border: 1px solid #667eea;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pfp-social-preview a:hover {
    background: #667eea;
    color: white;
}

/* ==========================================================================
   Image Upload Areas
   ========================================================================== */

.pfp-image-upload-area {
    border: 2px dashed #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.pfp-image-upload-area.pfp-dragover {
    border-color: #667eea;
    background-color: #f8f9ff;
}

.pfp-upload-zone {
    text-align: center;
    padding: 40px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pfp-upload-zone:hover {
    background-color: #f8f9fa;
}

.pfp-upload-placeholder {
    color: #666;
}

.pfp-upload-icon {
    fill: #999;
    margin-bottom: 15px;
}

.pfp-upload-placeholder p {
    margin: 10px 0;
}

.pfp-upload-placeholder small {
    color: #999;
}

/* ==========================================================================
   Image Grid
   ========================================================================== */

.pfp-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.pfp-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.pfp-image-item {
    position: relative;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pfp-image-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.pfp-image-container {
    position: relative;
    display: block;
}

.pfp-image-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.pfp-gallery-item img {
    height: 180px;
}

.pfp-image-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 999999; /* High z-index to ensure visibility over Divi theme elements */
}

.pfp-image-item:hover .pfp-image-overlay {
    opacity: 1;
}

.pfp-image-delete {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: background-color 0.3s ease;
    z-index: 999999; /* Ensure delete button is always visible */
    position: relative;
}

.pfp-image-delete:hover {
    background: #c0392b;
    transform: scale(1.1); /* Slightly enlarge on hover for better visibility */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); /* Add shadow for better contrast */
}

/* Drag handle styles moved to sortable section below */

/* Sortable styles */
.pfp-sortable {
    min-height: 50px;
}

.pfp-sortable .pfp-sortable-item {
    transition: transform 0.3s ease;
    position: relative;
}

.pfp-sortable .ui-sortable-helper {
    transform: rotate(5deg);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1000;
    cursor: move;
}

.pfp-sortable .ui-sortable-placeholder {
    border: 2px dashed #667eea;
    background: rgba(102, 126, 234, 0.1);
    visibility: visible !important;
    margin: 10px;
    border-radius: 8px;
}

.pfp-sortable .pfp-dragging {
    opacity: 0.8;
    transform: rotate(2deg);
}

/* Make drag handle more prominent */
.pfp-image-drag-handle {
    background: rgba(0,0,0,0.8);
    color: white;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: move;
    font-size: 14px;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    z-index: 999999; /* Ensure drag handle is always visible */
    position: relative;
}

.pfp-image-drag-handle:hover {
    background: rgba(0,0,0,0.95);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); /* Add shadow for better contrast */
}

.pfp-image-caption,
.pfp-gallery-meta {
    padding: 15px;
}

.pfp-image-caption input,
.pfp-gallery-meta input,
.pfp-gallery-meta textarea {
    width: 100%;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.pfp-gallery-meta textarea {
    resize: vertical;
    min-height: 60px;
}

/* ==========================================================================
   Section Save Button
   ========================================================================== */

.pfp-section-save {
    text-align: center;
    padding: 20px 0;
    margin-top: 20px;
    border-top: 1px solid #e5e5e5;
}

/* ==========================================================================
   Form Actions
   ========================================================================== */

.pfp-form-actions {
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid #e5e5e5;
    margin-top: 30px;
}

.pfp-btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.pfp-btn.pfp-btn-primary {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%) !important;
    color: white !important;
    font-weight: 600;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    border: none !important;
}

.pfp-btn.pfp-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.5);
    background: linear-gradient(135deg, #e55a2b 0%, #e8851a 100%) !important;
    color: white !important;
}

.pfp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.pfp-save-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    font-size: 0.9em;
    display: none;
}

.pfp-save-status.pfp-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.pfp-save-status.pfp-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* ==========================================================================
   Messages
   ========================================================================== */

.pfp-message {
    padding: 20px;
    border-radius: 6px;
    margin: 20px 0;
    text-align: center;
}

.pfp-message h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.pfp-message-info {
    background: #e3f2fd;
    color: #1976d2;
    border-left: 4px solid #2196f3;
}

.pfp-message-warning {
    background: #fff3e0;
    color: #ef6c00;
    border-left: 4px solid #ff9800;
}

.pfp-message-error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.pfp-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.pfp-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #667eea;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: pfp-spin 1s linear infinite;
}

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

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

@media (max-width: 768px) {
    .pfp-editor-container {
        padding: 15px;
    }
    
    .pfp-header-top {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .pfp-points-display {
        justify-content: center;
    }
    
    .pfp-points-badge {
        padding: 10px 16px;
    }
    
    .pfp-field-group {
        flex-direction: column;
        gap: 0;
    }
    
    .pfp-social-field {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .pfp-social-input {
        width: 100%;
        min-width: auto;
    }
    
    .pfp-image-grid {
        grid-template-columns: 1fr;
    }
    
    .pfp-completion-meter {
        flex-direction: column;
        gap: 10px;
    }
    
    .pfp-progress-bar {
        width: 100%;
        max-width: 300px;
    }
     /* Profile Picture Mobile Styles */
     .pfp-profile-picture-field .pfp-profile-avatar-container {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .pfp-current-avatar {
        order: -1; /* Show current avatar above upload area */
    }

    .pfp-avatar-upload {
        width: 100%;
        max-width: 400px;
    }

    .pfp-profile-upload-zone .pfp-upload-zone {
        padding: 15px;
        min-height: 120px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .pfp-profile-upload-zone .pfp-upload-icon {
        width: 24px;
        height: 24px;
    }

    .pfp-profile-upload-zone p {
        font-size: 14px;
        margin: 8px 0 4px 0;
    }

    .pfp-profile-upload-zone small {
        font-size: 11px;
    }

    .pfp-upload-btn {
        margin-top: 8px;
        padding: 8px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .pfp-editor-header h2 {
        font-size: 2em;
    }
    
    .pfp-section-title {
        padding: 15px 20px;
        font-size: 1.1em;
    }
    
    .pfp-section-content {
        padding: 20px 15px;
    }
    
    .pfp-btn {
        width: 100%;
        padding: 15px;
    }
}

/* ==========================================================================
   Profile Picture Styles
   ========================================================================== */

.pfp-profile-picture-field .pfp-profile-avatar-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.pfp-current-avatar {
    flex-shrink: 0;
}

.pfp-avatar-image {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e5e5e5;
}

.pfp-avatar-placeholder {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: #f3f3f3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    border: 3px solid #e5e5e5;
}

.pfp-avatar-upload {
    flex: 1;
    min-width: 0;
}

.pfp-profile-upload-zone .pfp-upload-zone {
    border: 2px dashed #d0d0d0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pfp-profile-upload-zone .pfp-upload-zone:hover {
    border-color: #2271b1;
    background: #f0f6ff;
}

.pfp-profile-upload-zone.pfp-dragover .pfp-upload-zone {
    border-color: #2271b1;
    background: #e8f4fd;
}

.pfp-profile-upload-zone .pfp-upload-icon {
    margin-bottom: 8px;
    opacity: 0.6;
}

.pfp-profile-upload-zone p {
    margin: 4px 0;
    color: #666;
}

.pfp-profile-upload-zone small {
    color: #888;
    font-size: 12px;
}

#pfp-profile-pic-grid {
    margin-top: 15px;
}

.pfp-profile-pic-item {
    max-width: 150px;
}

.pfp-profile-pic-item .pfp-image-preview img {
    border-radius: 8px;
}

.pfp-profile-pic-item .pfp-image-overlay {
    border-radius: 8px;
    z-index: 999999; /* Ensure profile picture overlay is always visible */
}

/* Additional Divi theme compatibility fixes */
.pfp-image-overlay,
.pfp-image-overlay *,
.pfp-image-delete,
.pfp-image-drag-handle {
    z-index: 999999 !important; /* Force high z-index for Divi compatibility */
}

/* Ensure overlay buttons are always clickable */
.pfp-image-overlay button,
.pfp-image-overlay .pfp-image-delete,
.pfp-image-overlay .pfp-image-drag-handle {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 999999 !important;
}

/* Make sure overlay background doesn't interfere */
.pfp-image-item {
    position: relative;
    z-index: 1;
}

.pfp-image-item:hover {
    z-index: 2;
}

/* Ensure proper stacking context */
.pfp-image-container {
    position: relative;
    z-index: 1;
}

/* Comprehensive Divi theme overrides for sample pictures and gallery */
.pfp-image-grid .pfp-image-item .pfp-image-overlay,
.pfp-gallery-grid .pfp-image-item .pfp-image-overlay,
#pfp-image-grid-sample .pfp-image-overlay,
#pfp-image-grid-gallery .pfp-image-overlay {
    z-index: 999999 !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    display: flex !important;
    gap: 5px !important;
}

.pfp-image-grid .pfp-image-item:hover .pfp-image-overlay,
.pfp-gallery-grid .pfp-image-item:hover .pfp-image-overlay,
#pfp-image-grid-sample .pfp-image-item:hover .pfp-image-overlay,
#pfp-image-grid-gallery .pfp-image-item:hover .pfp-image-overlay {
    opacity: 1 !important;
}

/* Force delete button visibility and styling */
.pfp-image-grid .pfp-image-delete,
.pfp-gallery-grid .pfp-image-delete,
#pfp-image-grid-sample .pfp-image-delete,
#pfp-image-grid-gallery .pfp-image-delete {
    background: #e74c3c !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 28px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    font-size: 16px !important;
    line-height: 1 !important;
    z-index: 999999 !important;
    position: relative !important;
    transition: all 0.3s ease !important;
}

.pfp-image-grid .pfp-image-delete:hover,
.pfp-gallery-grid .pfp-image-delete:hover,
#pfp-image-grid-sample .pfp-image-delete:hover,
#pfp-image-grid-gallery .pfp-image-delete:hover {
    background: #c0392b !important;
    transform: scale(1.1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* Force drag handle visibility and styling */
.pfp-image-grid .pfp-image-drag-handle,
.pfp-gallery-grid .pfp-image-drag-handle,
#pfp-image-grid-sample .pfp-image-drag-handle,
#pfp-image-grid-gallery .pfp-image-drag-handle {
    background: rgba(0,0,0,0.8) !important;
    color: white !important;
    border-radius: 4px !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: move !important;
    font-size: 14px !important;
    z-index: 999999 !important;
    position: relative !important;
    transition: all 0.3s ease !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

.pfp-image-grid .pfp-image-drag-handle:hover,
.pfp-gallery-grid .pfp-image-drag-handle:hover,
#pfp-image-grid-sample .pfp-image-drag-handle:hover,
#pfp-image-grid-gallery .pfp-image-drag-handle:hover {
    background: rgba(0,0,0,0.95) !important;
    transform: scale(1.1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

/* ==========================================================================
   Organizer Information Section Styling
   ========================================================================== */

.pfp-organizer-info-section {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    margin: 32px 0 24px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.pfp-subsection-title {
    color: #2c3e50;
    font-size: 1.2em;
    font-weight: 600;
    margin: 0 0 8px 0;
    padding: 0;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

.pfp-subsection-note {
    color: #6c757d;
    font-size: 0.9em;
    margin: 0 0 20px 0;
    font-style: italic;
}

.pfp-organizer-info-section .pfp-field-group {
    margin-bottom: 20px;
}

.pfp-organizer-info-section .pfp-field {
    background: white;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.pfp-organizer-info-section .pfp-field label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 6px;
}

.pfp-organizer-info-section input,
.pfp-organizer-info-section select,
.pfp-organizer-info-section textarea {
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 8px 12px;
}

.pfp-organizer-info-section input:focus,
.pfp-organizer-info-section select:focus,
.pfp-organizer-info-section textarea:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

/* ==========================================================================
   Collapsible Explanation Sections
   ========================================================================== */
.pfp-collapsible .pfp-explanation-header {
    cursor: pointer;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.pfp-collapsible .pfp-explanation-header:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.pfp-collapsible .pfp-explanation-header strong {
    margin: 0;
    font-size: 1.1em;
    color: #495057;
}

.pfp-toggle-icon {
    font-size: 0.9em;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.pfp-collapsible.collapsed .pfp-toggle-icon {
    transform: rotate(-90deg);
}

.pfp-explanation-content {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 1000px;
    opacity: 1;
}

.pfp-collapsible.collapsed .pfp-explanation-content {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
} 