/* List Deal Form Styles */

.tahn-list-deal-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    background: #fff;
}

.tahn-list-deal-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.tahn-list-deal-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 10px 0;
}

.tahn-list-deal-header p {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

/* Tabbed Form Navigation */
.tahn-form-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e5e7eb;
    overflow-x: auto;
}

.tahn-form-tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #6b7280;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.tahn-form-tab:hover {
    color: #7c3aed;
}

.tahn-form-tab.active {
    color: #7c3aed;
    border-bottom-color: #7c3aed;
}

/* Tab Panels */
.tahn-form-panel {
    display: none;
}

.tahn-form-panel.active {
    display: block;
}

/* Form Sections */
.tahn-form-section {
    margin-bottom: 40px;
}

.tahn-form-section-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

/* Form Groups */
.tahn-form-group {
    margin-bottom: 24px;
}

.tahn-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.tahn-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.tahn-form-group label .required {
    color: #ef4444;
}

.tahn-form-group input[type="text"],
.tahn-form-group input[type="email"],
.tahn-form-group input[type="number"],
.tahn-form-group input[type="date"],
.tahn-form-group input[type="url"],
.tahn-form-group select,
.tahn-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    color: #1f2937;
    background: #fff;
    transition: all 0.2s;
}

.tahn-form-group input[type="text"]:focus,
.tahn-form-group input[type="email"]:focus,
.tahn-form-group input[type="number"]:focus,
.tahn-form-group input[type="date"]:focus,
.tahn-form-group input[type="url"]:focus,
.tahn-form-group select:focus,
.tahn-form-group textarea:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.tahn-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.tahn-form-group input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px dashed #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

/* Repeater Fields */
.tahn-repeater-field {
    margin-bottom: 30px;
}

.tahn-repeater-items {
    margin-bottom: 15px;
}

.tahn-repeater-item {
    padding: 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 15px;
    position: relative;
}

.tahn-repeater-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.tahn-repeater-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.tahn-repeater-remove {
    padding: 6px 12px;
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.tahn-repeater-remove:hover {
    background: #dc2626;
}

.tahn-repeater-add {
    padding: 10px 20px;
    background: #7c3aed;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.tahn-repeater-add:hover {
    background: #6d28d9;
}

/* Form Actions */
.tahn-form-actions {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e5e7eb;
}

.tahn-form-actions button {
    padding: 12px 32px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tahn-btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.tahn-btn-secondary:hover {
    background: #d1d5db;
}

.tahn-btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tahn-btn-primary {
    background: #7c3aed;
    color: #fff;
}

.tahn-btn-primary:hover {
    background: #6d28d9;
}

.tahn-btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Messages */
.tahn-form-message {
    padding: 15px 20px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 20px;
}

.tahn-form-message.success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #86efac;
}

.tahn-form-message.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

.tahn-form-message:empty {
    display: none;
}

/* Help Text */
.tahn-field-help {
    font-size: 13px;
    color: #6b7280;
    margin-top: 6px;
}

/* Responsive */
@media (max-width: 768px) {
    .tahn-form-row {
        grid-template-columns: 1fr;
    }

    .tahn-form-tabs {
        gap: 5px;
    }

    .tahn-form-tab {
        padding: 10px 16px;
        font-size: 14px;
    }

    .tahn-form-actions {
        flex-direction: column;
    }

    .tahn-form-actions button {
        width: 100%;
    }
}

/* ============================================
   DEAL DISPLAY PAGE STYLES - Zoopla-style Gallery
   ============================================ */

/* Gallery Container - Zoopla Style */
.deal-gallery-zoopla {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
    height: 500px;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.gallery-main {
    grid-row: 1 / 3;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: #f3f4f6;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-main:hover img {
    transform: scale(1.05);
}

.gallery-thumbnail {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: #f3f4f6;
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.gallery-thumbnail:hover img {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.gallery-thumbnail:last-child::after {
    content: 'View all photos';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.gallery-thumbnail:last-child:hover::after {
    background: rgba(0, 0, 0, 0.7);
}

/* Gallery Modal */
.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    padding: 20px;
}

.gallery-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
}

.gallery-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    line-height: 1;
}

.gallery-modal-close:hover {
    color: #ccc;
}

.gallery-modal-nav {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.gallery-nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid white;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.gallery-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.gallery-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.gallery-counter {
    color: white;
    margin-top: 15px;
    font-size: 14px;
}

/* Deal Content Layout */
.deal-content-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Main Content Area */
.deal-main-content {
    background: white;
}

/* Deal Header Styles */
.deal-header-new {
    background: white;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.deal-title {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.deal-location-display {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    color: #6b7280;
    margin: 0 0 12px 0;
}

.deal-price-display {
    font-size: 15px;
    color: #4b5563;
    margin: 0;
}

.deal-price-display strong {
    color: #1f2937;
}

/* Section Styling */
.deal-section-new {
    background: white;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.deal-section-new h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.deal-section-new h3 {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 12px 0;
}

/* Overview Grid */
.deal-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.overview-item {
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.overview-item-full {
    grid-column: 1 / -1;
}

.overview-label {
    display: block;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 6px;
    font-weight: 500;
}

.overview-value {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
}

/* Description */
.deal-description {
    font-size: 16px;
    line-height: 1.8;
    color: #4b5563;
}

.deal-description p {
    margin-bottom: 16px;
}

.deal-description p:last-child {
    margin-bottom: 0;
}

/* Map Embed */
.deal-map-embed {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#deal-woosmap {
    width: 100%;
    height: 400px;
}

.deal-map-placeholder {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 40px 24px;
    text-align: center;
}

.deal-map-placeholder p {
    color: #6b7280;
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
}

.deal-map-placeholder strong {
    color: #1f2937;
    display: block;
    margin-bottom: 4px;
}

.deal-map-placeholder small {
    color: #9ca3af;
    font-size: 13px;
}

/* Back Button */
.deal-back-nav {
    margin-bottom: 20px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #4b5563;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.back-link:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #1f2937;
}

.back-link svg {
    width: 18px;
    height: 18px;
}

/* Download PDF Button */
.btn-download-pdf {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: #0284c7;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-download-pdf:hover {
    background: #0369a1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.btn-download-pdf svg {
    width: 20px;
    height: 20px;
}

/* Disclaimer */
.deal-disclaimer {
    background: #fef9e7;
    border: 1px solid #f9e79f;
    border-radius: 8px;
    padding: 20px;
}

.deal-disclaimer h3 {
    font-size: 16px;
    font-weight: 700;
    color: #7d6608;
    margin: 0 0 12px 0;
}

.deal-disclaimer p {
    font-size: 14px;
    color: #78350f;
    line-height: 1.7;
    margin: 0;
}

/* Support Section */
.deal-support {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 18px;
}

.deal-support p {
    margin: 0;
    color: #0c4a6e;
    font-size: 14px;
    line-height: 1.6;
}

.deal-support a {
    color: #0284c7;
    text-decoration: none;
    font-weight: 600;
}

.deal-support a:hover {
    text-decoration: underline;
}

/* Sidebar */
.deal-sidebar-new {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.sidebar-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sidebar-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.sidebar-value {
    font-size: 15px;
    color: #4b5563;
    line-height: 1.6;
}

/* Developer Info Card */
.developer-info {
    text-align: center;
}

.developer-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 16px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    background: #f9fafb;
}

.developer-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.developer-name {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 20px 0;
    line-height: 1.3;
}

/* Sidebar Buttons */
.developer-info .btn-see-more-dev,
.developer-info .btn-message-dev,
.developer-info .btn-place-bid {
    display: block;
    width: 100%;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-align: center;
    text-decoration: none;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.btn-see-more-dev {
    background: #f9fafb;
    color: #1f2937;
    border: 2px solid #e5e7eb;
}

.btn-see-more-dev:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.btn-message-dev {
    background: #0E1937;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-message-dev:hover {
    background: #1a2849;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(14, 25, 55, 0.2);
}

.btn-place-bid {
    background: linear-gradient(135deg, #8C3EFA 0%, #209DD9 100%);
    color: white;
    font-size: 16px;
    padding: 16px 20px;
}

.btn-place-bid:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(140, 62, 250, 0.3);
    filter: brightness(1.05);
}

.btn-edit-deal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: #0284c7;
    color: white !important;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-edit-deal:hover {
    background: #0369a1;
    color: white !important;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

/* Planning Status */
.planning-status-grid {
    display: grid;
    gap: 15px;
}

.planning-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f9fafb;
    border-radius: 6px;
}

.planning-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.planning-value {
    font-size: 14px;
    color: #1f2937;
    font-weight: 600;
}

.planning-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-approved {
    background: #d1fae5;
    color: #065f46;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-not-required {
    background: #e5e7eb;
    color: #374151;
}

/* Documents List */
.sidebar-docs-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-docs-list li {
    margin-bottom: 10px;
}

.sidebar-docs-list li:last-child {
    margin-bottom: 0;
}

.sidebar-docs-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    color: #1f2937;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-docs-list a:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    transform: translateX(3px);
}

.sidebar-docs-list svg {
    flex-shrink: 0;
    color: #6b7280;
}

/* Additional Details */
.sidebar-details-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.detail-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
    flex-shrink: 0;
}

.detail-value {
    font-size: 14px;
    color: #1f2937;
    font-weight: 600;
    text-align: right;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .deal-gallery-zoopla {
        height: 400px;
    }

    .deal-content-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .deal-sidebar-new {
        position: static;
    }

    .deal-title {
        font-size: 28px;
    }

    .deal-overview {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .deal-gallery-zoopla {
        grid-template-columns: 1fr;
        grid-template-rows: 300px repeat(4, 100px);
        height: auto;
    }

    .gallery-main {
        grid-row: 1;
    }

    .deal-title {
        font-size: 24px;
    }

    .deal-overview {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .deal-map-container {
        height: 300px;
    }

    .developer-actions {
        gap: 8px;
    }
}

/* Back to Search Button */
.deal-top-section {
    padding: 20px;
    background: #f9fafb;
    margin-bottom: 30px;
}

.btn-back-search {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    color: #1f2937;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-back-search:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    transform: translateX(-5px);
}
