/* ==================== Global Styles ==================== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f7f7f7;
    margin: 0;
    padding: 0;
    color: #1a1a1a;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    min-height: 90vh;
}

/* ==================== Navbar ==================== */
header {
    background-color: #FF0000;
    padding: 15px 0;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* slightly deeper shadow */
    border: 1px solid rgba(255, 255, 255, 0.1); /* subtle inner outline */
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.navbar-menu {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.navbar-item {
    margin-right: 20px;
}

.navbar-item .button {
    text-decoration: none;
    color: white;
    font-weight: bold;
    padding: 12px 18px;
    border-radius: 8px;
    background-color: #FF0000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.navbar-item .button:hover {
    background-color: #cc0000;
    transform: scale(1.05);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.25); /* soft glow effect */
}



/* ==================== Welcome + Page Title ==================== */
@keyframes deepElegantPulse {
    0% {
      text-shadow:
        0 0 1px #00000030,
        0 0 3px #ff000025,
        0 0 6px #ff000020;
    }
    50% {
      text-shadow:
        0 0 2px #00000040,
        0 0 6px #ff000040,
        0 0 12px #ff000030;
    }
    100% {
      text-shadow:
        0 0 1px #00000030,
        0 0 3px #ff000025,
        0 0 6px #ff000020;
    }
  }
  
  .welcome-message {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-size: 1.3em;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
    text-align: center;
    letter-spacing: 0.7px;
    font-family: 'Inter', 'Segoe UI', sans-serif;
  
    animation: deepElegantPulse 4s ease-in-out infinite;
  
    /* Optional: subtle uppercase boost */
    text-transform: uppercase;
  
    /* Bonus: Add slight tracking for grandeur */
    word-spacing: 1px;
  }
  
  



.page-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.page-title h1 {
    font-size: 2.8em;
    font-weight: 900;
    color: #FF0000;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1),
                 0 0 12px rgba(255, 0, 0, 0.3); /* red glow pop */

    background: linear-gradient(90deg, #ff1a1a, #ff4d4d, #ff1a1a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    animation: shimmer 3s infinite linear;
}


.filters {
    display: flex;
    gap: 12px;
}

.filter-button {
    padding: 8px 16px;
    background-color: white;
    border: 2px solid #FF0000;
    color: #FF0000;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.filter-button.active,
.filter-button:hover {
    background-color: #FF0000;
    color: white;
    transform: scale(1.05);
}

/* ==================== Column Layout ==================== */
.contract-columns {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    flex-wrap: wrap;
}

.contract-column {
    flex: 1;
    min-width: 45%;
    padding: 20px;
    border-radius: 12px;
    background-color: #fff;
}

.general-glow {
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.25);
}

.transit-glow {
    box-shadow: 0 0 15px rgba(0, 200, 0, 0.25);
}

/* ==================== Contract List ==================== */
.contract-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
    overflow: hidden;
    position: relative;
    height: 400px; /* or however many cards you want visible */
}

/* ✅ FIX: When any card is open, allow it to expand without bleeding */
.contract-list:has(.contract-item.open) {
    height: auto;
    overflow: visible;
}

/* Base contract card styling (shrunken bubble mode) */
.contract-item {
    max-width: 300px; /* roughly 1/3 of standard desktop width */
    margin: 10px auto;
    padding: 10px 14px;
    font-size: 0.85em;
    border: 1px solid #ddd;
    border-left: 3px solid #ccc;
    border-radius: 10px;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Hover for slight feedback */
.contract-item:hover {
    background-color: #f9f9f9;
}

/* ✅ FIX: Stop hiding inner sections with display:none.
   The details-section accordion controls visibility now.
   (display:none + max-height accordion = conflicts, especially with images) */
.contract-details,
.contract-image-container,
.contract-status,
.contract-actions {
    display: block;
}

/* EXPANDED STATE */
.contract-item.open {
    max-width: 100%;
    white-space: normal;
    overflow: visible;
    /* ✅ FIX: Prevent transform context weirdness while expanded */
    transform: none !important;
}

/* Responsive tweak for mobile */
@media (max-width: 768px) {
    .contract-item {
        max-width: 95%;
        font-size: 0.8em;
    }
}



.contract-item:hover {
    background-color: #fefefe;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.contract-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contract-name {
    font-size: 1.3em;
    font-weight: 700;
    color: #111;
    margin-bottom: 3px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contract-meta {
    font-size: 0.9em;
    color: #666;
}

.contract-meta span {
    color: #444;
    font-weight: 500;
}

.contract-image-container {
    width: 100%;
    max-width: 420px;
    margin: 10px auto;
    padding: 12px;
    text-align: center;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    background-color: #fafafa;

    /* ✅ FIX: stabilize layout / prevent painting outside during animation */
    position: relative;
    box-sizing: border-box;
}

.contract-image-container img {
    width: 100%;
    height: auto;
    max-height: 260px;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.3s ease;

    /* ✅ FIX: remove inline-image baseline weirdness & prevent jump */
    display: block;
}

.contract-image-container img:hover {
    transform: scale(1.05);
}

.contract-actions {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toggle-details-btn {
    /*background-color: #e2e8f0; /* light gray-blue */
    color: #333;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  .toggle-details-btn:hover {
    background-color: #cbd5e0; /* darker gray-blue */
  }
  

.contract-details {
    padding: 12px;
    background-color: #f9f9f9;
    border-left: 4px solid #FF0000;
    border-radius: 8px;
    color: #333;
}

.contract-status {
    font-size: 0.95em;
    font-weight: bold;
    color: #555;
}

/* ==================== Buttons Shared ==================== */
.delete-button,
.add-button,
.button {
    background-color: #f87171;
    color: white;
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.delete-button:hover,
.add-button:hover,
.toggle-details-btn:hover,
.button:hover {
    background-color: #dc2626;
    transform: scale(1.05);
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    .contract-columns {
        flex-direction: column;
    }
    .contract-column {
        min-width: 100%;
    }
}

/* ==================== Payment Section ==================== */
.profile-payment,
.profile-payment-add {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background-color: #fafafa;
}

.profile-payment h2,
.profile-payment-add h3 {
    color: #FF0000;
    margin-bottom: 10px;
}

.qr-label {
    margin-top: 10px;
    font-weight: 600;
    color: #444;
}

/* ==================== Chat Box ==================== */
.chat-box {
    margin-top: 15px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    background-color: #fcfcfc;
    border-radius: 10px;
}

.chat-status {
    font-weight: bold;
    margin-bottom: 10px;
}

.chat-status.open {
    color: green;
}

.chat-status.locked {
    color: red;
}

.chat-messages {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 10px;
    padding-right: 10px;
}

.chat-message {
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
}

.timestamp {
    color: #888;
    font-size: 0.8em;
}

.message-form textarea {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-family: inherit;
    font-size: 1em;
    resize: none;
    margin-bottom: 10px;
}

.message-form button {
    float: right;
}

/* ==================== Summary ==================== */
.summary-box {
    margin-top: 40px;
    padding: 20px;
    background-color: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 10px;
    text-align: center;
}

.summary-box h2 {
    color: #FF0000;
    margin-bottom: 10px;
}

.summary-box p {
    font-size: 1em;
    margin: 6px 0;
    color: #333;
}

/* ==================== Profile Sections (Payment + Proposals) ==================== */
.profile-payment,
.profile-payment-add,
.proposals-sent,
.proposals-received {
    max-width: 700px;
    margin: 40px auto;
    padding: 20px 30px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
    border-left: 6px solid #FF0000;
}

.profile-payment h2,
.profile-payment-add h3,
.proposals-sent h2,
.proposals-received h2 {
    margin-top: 0;
    font-size: 1.5em;
    font-weight: bold;
    color: #FF0000;
    text-align: center;
    margin-bottom: 20px;
}

.profile-payment label,
.profile-payment-add label {
    font-weight: 600;
    color: #333;
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
}

.profile-payment select,
.profile-payment input[type="text"],
.profile-payment-add select,
.profile-payment-add input[type="text"] {
    width: 100%;
    padding: 10px;
    font-size: 0.95em;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-bottom: 10px;
}

.profile-payment .button,
.profile-payment-add .button {
    margin-top: 10px;
}

/* QR Code display */
#qr-code-display {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
}

#qr-code-display > div {
    margin: 0 auto;
}

.qr-label {
    text-align: center;
    color: #888;
    font-size: 0.85em;
    margin-top: 10px;
}

/* Proposals Lists */
.proposals-sent ul,
.proposals-received ul {
    list-style: none;
    padding: 0;
}

.proposals-sent li,
.proposals-received li {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 15px;
    line-height: 1.5;
    font-size: 0.95em;
}

.proposals-sent li strong,
.proposals-received li strong {
    color: #111;
}

.proposals-sent li em,
.proposals-received li em {
    font-style: italic;
    color: #555;
}

.proposals-sent li small,
.proposals-received li small {
    color: #999;
    font-size: 0.8em;
}

.proposals-received .button {
    margin-top: 10px;
    margin-right: 10px;
}

/* === Sign In Page Centering === */
.auth-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.auth-main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.auth-card {
    background-color: #1a1a1a;
    color: white;
    padding: 30px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.2);
}

.auth-card input {
    width: 100%;
    padding: 10px;
    margin-top: 12px;
    border-radius: 6px;
    border: 1px solid #444;
    background: #333;
    color: #fff;
}

@media (max-width: 768px) {
  .contract-columns {
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    gap: 1.5rem;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .contract-column {
    width: 100%;
    max-width: 95vw;
    margin: 0 auto;
    padding: 1rem;
    box-sizing: border-box;
  }

  .contract-item {
    width: 100%;
    box-sizing: border-box;
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .contract-container {
    padding: 0.75rem;
    font-size: 0.95rem;
  }

  .contract-name {
    font-size: 1rem;
    word-wrap: break-word;
  }

  .contract-meta,
  .contract-status {
    font-size: 0.85rem;
  }

  .contract-item .contract-image-container img {
    max-height: 140px;
    width: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
  }
  

  .toggle-details-btn,
  .delete-button,
  .save-description-btn {
    font-size: 0.85rem;
    padding: 6px 10px;
  }

  .description-textarea {
    width: 100%;
    font-size: 0.9rem;
    box-sizing: border-box;
  }
}

/* General & Transit Tags Styling */
.status-tag {
    display: inline-block;
    padding: 4px 10px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 14px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 10px;
  }
  
  .status-general {
    background-color: #f87171; /* red */
    color: white;
  }
  
  .status-transit {
    background-color: #34d399; /* green */
    color: white;
    animation: glow 2s infinite ease-in-out;
  }
  
  @keyframes glow {
    0% { box-shadow: 0 0 5px #34d399; }
    50% { box-shadow: 0 0 15px #34d399; }
    100% { box-shadow: 0 0 5px #34d399; }
  }



 /* Rotisserie */ 

 /* === ROTISSERIE CORE === */

/* ✅ NOTE: contract-list is already defined above with height/overflow.
   Keep this block for clarity but avoid redefining height/overflow here. */

.contract-item {
  transition: transform 0.8s ease-in-out, opacity 0.5s ease-in-out;
  will-change: transform, opacity;
}

  
  
   
  /* page-title h1 */  
  
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}
 
/* Image sizing fix :) neww*/ 

/* ✅ FIX: keep overflow hidden in both states; do NOT switch to visible */
.contract-item .details-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }
  
  .contract-item.open .details-section {
    max-height: 2000px; /* plenty for image + description + actions */
    overflow: hidden;
  }
