/*!
 * Premium Casting Calls - Main CSS File
 *
 * Description: Primary stylesheet for the Premium Casting Calls WordPress plugin
 * Version: 1.1.0
 * Author: NS33@castandcrew
 * License: GPL v2+
 *
 * Note: Button styles, container styles, table styles, and management styles
 * are defined in bw-theme.css which loads after this file.
 *
 * Dependencies: None
 * Enqueued on: Front-end and admin casting call pages
 */

/* ==========================================================================
   CSS Reset and Base Styles
   ========================================================================== */

/* Plugin-specific reset to prevent theme conflicts */
.pcc-form-container *,
.pcc-post-box *,
.pcc-manage-container *,
.pcc-filter-container * {
    box-sizing: border-box;
}

/* ==========================================================================
   Premium Content Box (Membership Prompt)
   ========================================================================== */

.pcc-membership-prompt {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #0056b3;
    border-radius: 16px;
    padding: 50px 60px;
    margin: 20px 0;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 86, 179, 0.1);
    position: relative;
    overflow: hidden;
    display: block;
    min-height: 220px;
}

.pcc-membership-prompt::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0056b3 0%, #007bff 100%);
}

.pcc-upgrade-content {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    text-align: center;
}

.pcc-lock-icon {
    font-size: 3rem;
    color: #0056b3;
    margin-bottom: 20px;
    display: block;
    text-align: center;
    opacity: 0.8;
    width: 100%;
}

.pcc-membership-prompt h3 {
    color: #0056b3 !important;
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 16px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    width: 100%;
    display: block;
}

.pcc-membership-prompt p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 auto 28px auto;
    font-weight: 500;
    text-align: center;
    width: 100%;
    max-width: 400px;
    display: block;
}

.pcc-upgrade-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 8px auto 0 auto;
    width: 100%;
    text-align: center;
}

/* Mobile responsive for membership prompt */
@media (max-width: 768px) {
    .pcc-upgrade-buttons {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
    }

    .pcc-membership-prompt {
        padding: 32px 24px;
        margin: 16px 0;
        min-height: 200px;
    }

    .pcc-lock-icon {
        font-size: 2.5rem;
        margin-bottom: 16px;
    }

    .pcc-membership-prompt h3 {
        font-size: 1.4rem;
    }
}

/* Post date styling */
.pcc-post-date {
    float: right;
    font-size: 0.8rem;
    color: #666666;
    font-weight: normal;
}

/* ==========================================================================
   Form Controls and Inputs
   ========================================================================== */

/* Standard form controls */
.form-control,
.form-select {
    background-color: #f8f9fa;
    color: #000000;
    border: 2px solid #0056b3;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.9rem;
    line-height: 1.4;
    height: 42px;
    max-height: 42px;
    transition: all 0.3s ease;
    appearance: none;
    box-shadow: 0 2px 8px rgba(0, 86, 179, 0.1);
    font-weight: 500;
}

.form-control:focus,
.form-select:focus {
    border-color: #0056b3;
    box-shadow: 0 0 12px rgba(0, 86, 179, 0.4);
    outline: none;
    transform: translateY(-2px);
}

/* Form labels */
.form-label {
    color: #333333;
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Date inputs */
input[type="date"] {
    background-color: #f8f9fa;
    color: #000000;
    border: 2px solid #0056b3;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.9rem;
    line-height: 1.5;
    min-height: 44px;
    height: auto;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 86, 179, 0.1);
    font-weight: 500;
    width: 100%;
}

input[type="date"]:focus {
    border-color: #0056b3;
    box-shadow: 0 0 12px rgba(0, 86, 179, 0.4);
    outline: none;
    transform: translateY(-2px);
}

/* Textarea styling */
textarea.form-control {
    min-height: 120px !important;
    resize: vertical !important;
    line-height: 1.6 !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
}

/* Specific heights for different textarea types */
textarea#short_desc,
textarea#pcc_short_desc {
    min-height: 180px !important;
}

textarea#full_desc,
textarea#pcc_full_desc {
    min-height: 240px !important;
}

/* ==========================================================================
   Post Content and Details
   ========================================================================== */

/* Single post page adjustments */
.single-post .pcc-post-box .pcc-details,
.single .pcc-post-box .pcc-details {
    margin-bottom: 6px !important;
    padding: 0 !important;
}

.single-post .pcc-post-box .pcc-details p,
.single .pcc-post-box .pcc-details p {
    font-size: 0.85rem !important;
    color: #333333 !important;
    margin-bottom: 2px !important;
    padding: 0 !important;
    line-height: 1.4 !important;
}

/* Character list styling */
.pcc-character-list {
    list-style: none;
    padding: 0;
}

.pcc-character-list li {
    background: linear-gradient(135deg, #f5f5f5, #e9ecef);
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 10px;
    color: #333333;
    border: 1px solid #0056b3;
    box-shadow: 0 2px 8px rgba(0, 86, 179, 0.1);
}

/* Icons */
.pcc-icon {
    margin-right: 6px;
    color: #0056b3;
    font-size: 1rem;
}

.pcc-details .fas.fa-video,
.pcc-details .fas.fa-map-marker-alt,
.pcc-details .fas.fa-money-bill,
.pcc-details .fas.fa-handshake,
.pcc-details .fas.fa-venus-mars,
.pcc-details .fas.fa-globe,
.pcc-details .fas.fa-users,
.pcc-details .fas.fa-calendar,
.pcc-details .fas.fa-clock {
    color: #0056b3;
}

/* View all button */
.pcc-view-all-btn {
    background: #0056b3 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    display: inline-block !important;
    cursor: pointer !important;
    font-size: 0.8rem !important;
}

.pcc-view-all-btn:hover {
    background: #003d82 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.3) !important;
    text-decoration: none !important;
}

/* ==========================================================================
   Alerts and Messages
   ========================================================================== */

.alert {
    margin-top: 16px;
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 500;
}

.pcc-no-results {
    color: #dc3545;
    font-size: 1rem !important;
    font-weight: 600;
}

/* ==========================================================================
   Text and Content Handling
   ========================================================================== */

/* Word wrapping - complete words only, no mid-word breaks */
.pcc-short-desc p,
.pcc-full-desc p,
.pcc-post-box p,
.pcc-title,
.pcc-title a,
.pcc-form-container h2,
.pcc-manage-container h2,
.pcc-manage-container h3 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    hyphens: auto !important;
    max-width: 100% !important;
}

/* Links - allow breaking only at natural points */
.pcc-short-desc a,
.pcc-full-desc a,
.pcc-post-box a {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-all !important;
    max-width: 100% !important;
    display: inline-block !important;
}

/* Better text wrapping for titles and headings */
.pcc-title,
.pcc-title a,
.pcc-form-container h2,
.pcc-manage-container h2,
.pcc-manage-container h3 {
    word-break: keep-all !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
}

/* Character details - better wrapping */
.pcc-character-list li {
    word-break: normal !important;
    hyphens: auto !important;
    line-height: 1.5 !important;
}

/* ==========================================================================
   Management Interface
   ========================================================================== */

.pcc-manage-container {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.pcc-manage-sections {
    margin-top: 20px;
}

/* ==========================================================================
   Utility Classes and Spacing
   ========================================================================== */

/* Compact spacing improvements */
.pcc-post-box > * {
    margin-bottom: 6px !important;
}

.pcc-post-box > *:last-child {
    margin-bottom: 0 !important;
}

/* Close description to details spacing */
.pcc-details + .pcc-short-desc {
    margin-top: 2px !important;
}

.pcc-short-desc + .pcc-full-desc {
    margin-top: 4px !important;
}

/* Text utilities */
.text-muted {
    color: #6c757d !important;
    font-size: 0.75rem !important;
}

.form-text {
    font-size: 0.7rem !important;
    margin-top: 3px !important;
}

/* Minimum height for form containers to prevent layout shifts */
.pcc-form-container {
    min-height: 200px;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

/* Focus states for accessibility */
.pcc-dropdown-toggle:focus {
    outline: 2px solid #0056b3;
    outline-offset: 2px;
}

/* ==========================================================================
   Character Section Hiding
   ========================================================================== */

.pcc-character-list,
ul.pcc-character-list,
.pcc-characters-heading,
h3.pcc-characters-heading {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* ==========================================================================
   Premium Content Box Centering Overrides
   ========================================================================== */

.pcc-membership-prompt {
    text-align: center !important;
    padding: 24px 40px !important;
    display: block !important;
    box-sizing: border-box !important;
    min-height: auto !important;
}

.pcc-membership-prompt * {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.pcc-upgrade-content {
    width: 100% !important;
    max-width: 460px !important;
    margin: 0 auto !important;
    text-align: center !important;
    display: block !important;
    padding: 0 !important;
}

.pcc-lock-icon {
    display: block !important;
    text-align: center !important;
    width: 100% !important;
    margin: 0 auto 12px auto !important;
    font-size: 2.2rem !important;
    color: #0056b3 !important;
}

.pcc-membership-prompt h3 {
    text-align: center !important;
    width: 100% !important;
    margin: 0 auto 10px auto !important;
    display: block !important;
    font-size: 1.4rem !important;
}

.pcc-membership-prompt p {
    text-align: center !important;
    width: 100% !important;
    max-width: 340px !important;
    margin: 0 auto 18px auto !important;
    display: block !important;
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
}

.pcc-upgrade-buttons {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 0 auto !important;
    width: 100% !important;
    text-align: center !important;
}

.pcc-membership-prompt .pcc-btn {
    padding: 10px 20px !important;
    font-size: 0.9rem !important;
    min-width: 130px !important;
    max-width: 150px !important;
    height: auto !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
}

.pcc-membership-prompt .pcc-btn-primary {
    min-width: 160px !important;
    max-width: 180px !important;
    font-weight: 600 !important;
}

@media (max-width: 768px) {
    .pcc-membership-prompt .pcc-btn {
        padding: 10px 14px !important;
        font-size: 0.8rem !important;
        min-width: 0 !important;
        max-width: none !important;
        white-space: nowrap !important;
        text-align: center !important;
    }

    .pcc-membership-prompt .pcc-btn-primary {
        min-width: 0 !important;
        max-width: none !important;
    }

    .pcc-membership-prompt .pcc-upgrade-buttons {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        justify-content: center !important;
    }
}
