/* AWDF Dynamic Floor Plans - Public Styles */

.awdf-floor-plans-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: #333;
}

.awdf-legend {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.awdf-legend h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.awdf-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.awdf-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}

.awdf-legend-color {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid #ddd;
    flex-shrink: 0;
}

.awdf-legend-label {
    font-size: 14px;
    color: #555;
}

.awdf-floor-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.awdf-floor-nav-item {
    margin-bottom: 8px;
}

.awdf-floor-nav-button {
    width: 100%;
    padding: 12px 16px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.awdf-floor-nav-button .awdf-floor-name {
    flex: 1;
    text-align: left;
    font-weight: 600;
    line-height: 1.6;
    color: #333;
}

.awdf-floor-nav-item.active .awdf-floor-name {
    color: #ffffff;
}

.awdf-floor-nav-button .awdf-available-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #27ae60;
    color: #fff;
    border-radius: 50%;
    font-size: 15px;
    line-height: 1em;
    font-weight: 600;
    margin-left: 8px;
    flex-shrink: 0;
}

.awdf-floor-nav-button .awdf-available-count[data-count="0"] {
    background: #717171;
}

/* Floor Display */
.awdf-floor-display {
    position: relative;
    background: #fff;
    border: none;
    border-radius: 0;
    overflow: hidden;
    min-height: 400px;
}

.awdf-floor-content {
    display: none;
}

.awdf-floor-content.active {
    display: block;
}

.awdf-svg-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
}

.awdf-svg-container svg {
    max-width: 100%;
    max-height: 600px;
    width: auto;
    height: auto;
    border: none;
    border-radius: 0;
    background: #ffffff;
}

.awdf-interactive-path {
    cursor: pointer;
    stroke-width: 2;
    transition: all 0.2s ease;
    fill-opacity: 0.5;
}

.awdf-interactive-path:hover {
    fill-opacity: 0.9;
    stroke-width: 3;
    filter: brightness(1.1);
}

.awdf-interactive-path.awdf-path-active {
    stroke-width: 3;
    stroke-linejoin: round;
    stroke: #222222;
    fill-opacity: .8;
    stroke-dasharray: 10px, 10px;
}

.awdf-apartment-info {
    display: flex !important;
    background: none !important;
    border-radius: 0;
    padding: 0;
    margin: 0;
    height: 100%;
    align-items: center;
    text-align: center;
    border: dashed 4px rgba(0, 0, 0, 0.2);
    justify-content: center;
}

.awdf-apartment-info.active {
    border: none;
    align-items: flex-start;
}

.awdf-apartment-info.active .awdf-info-content {
    height: 100%;
    background-color: #004f9f;
    color: #ffffff;
}

.awdf-apartment-info.active .awdf-info-content .awdf-info-loading {
    color: #ffffff;
    padding: 20px;
    text-align: center;
}

.awdf-info-placeholder p {
    font-weight: bold;
    font-size: 19px;
    color: rgba(0, 0, 0, 0.2);
    padding: 10px;
    margin: 0;
}

.awdf-info-content {
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.awdf-info-content h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #2c3e50;
}

.awdf-info-content h4 a {
    color: #e74c3c;
    text-decoration: none;
}

.awdf-info-content h4 a:hover {
    text-decoration: underline;
}

.awdf-apartment-thumbnail {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 280px;
    margin-bottom: -48px;
}

.awdf-apartment-thumbnail img {
    max-width: 100%;
    border-radius: 0;
    object-fit: cover;
    width: 100%;
    height: 280px;
    margin: 0;
}

.awdf-apartment-info .awdf-info-data {
    text-align: left;
}

.awdf-info-data .txt-center {
    text-align: center;
}

.awdf-apartment-info .awdf-info-data img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.awdf-apartment-info .awdf-info-data .awdf-path-title {
    display: inline-flex;
    position: relative;
    width: auto;
    max-width: 80%;
    background: #004f9f;
    color: #ffffff;
    height: 48px;
    padding: 15px 20px 5px;
    font-weight: bold;
    text-decoration: underline;
    font-size: 22px;
    line-height: 1em;
    justify-content: flex-start;
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    margin: 0;
}

.awdf-apartment-excerpt,
.awdf-apartment-content {
    margin: 0;
    color: #ffffff;
    background-color: #004f9f;
    padding: 5px 20px;
    overflow-y: auto;
}

.awdf-apartment-content h1,
.awdf-apartment-content h2,
.awdf-apartment-content h3,
.awdf-apartment-content h4,
.awdf-apartment-content h5,
.awdf-apartment-content h6 {
    color: #2c3e50;
    margin: 20px 0 10px 0;
}

.awdf-apartment-content p {
    margin: 10px 0;
}

.awdf-apartment-content ul,
.awdf-apartment-content ol {
    margin: 10px 0;
    padding-left: 20px;
}

.awdf-view-details {
    display: inline-block;
    padding: 10px 20px;
    background: #e74c3c;
    color: #fff !important;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.3s ease;
    margin-top: 15px;
}

.awdf-view-details:hover {
    background: #c0392b;
    text-decoration: none;
}

/* Admin Controls */
.awdf-admin-controls {
    padding: 20px;
    border: 2px solid #ffaf51;
    background: #ffffff;
    margin: 20px;
    border-radius: 0;
    outline: 2px solid #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
}

.awdf-admin-controls h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.awdf-connect-post-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin: 10px 0;
}

.awdf-connect-post-section label {
    font-weight: 500;
    color: #555;
    font-size: 13px;
}

.awdf-connect-post-section select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.awdf-connect-post-section button {
    padding: 8px 16px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.3s ease;
}

.awdf-connect-post-section button:hover:not(:disabled) {
    background: #005a87;
}

.awdf-connect-post-section button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading State */
.awdf-info-loading {
    text-align: center;
    color: #777;
    font-style: italic;
}

/* Error Messages */
.awdf-error {
    color: #d63638;
    background: #fff2f2;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
}

/* Post Type Indicator */
.awdf-post-type-indicator {
    font-size: 11px;
    color: #777;
    font-style: italic;
}

/* Desktop only */
.awdf-desktop-only {
    display: none !important;
}

/* Mobile only */
.awdf-mobile-only {
    display: none !important;
}

.awdf-apartment-content .object-details {
    line-height: 1em;
}

.awdf-apartment-content .object-details>p {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 8px;
}

/* CSS Loading icon */
.awcf-loader-wrapper {
    display: inline-block;
    margin: 0 auto;
    width: 50px;
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        radial-gradient(farthest-side, #303030 94%, #0000) top/8px 8px no-repeat,
        conic-gradient(#0000 30%, #303030);
    -webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - 8px), #000 0);
    animation: aw_rotate_loader 1s infinite linear;
}

.awcf-loader-wrapper {
    width: 50px;
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        radial-gradient(farthest-side, #303030 94%, #0000) top/8px 8px no-repeat,
        conic-gradient(#0000 30%, #303030);
    -webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - 8px), #000 0);
    animation: aw_rotate_loader 1s infinite linear;
}

.awdf-apartment-info.active .awdf-info-content .awcf-loader-wrapper {
    background:
        radial-gradient(farthest-side, #ffffff 94%, #0000) top/8px 8px no-repeat,
        conic-gradient(#0000 30%, #ffffff);
    -webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - 8px), #000 0);
}

@keyframes aw_rotate_loader {
    100% {
        transform: rotate(1turn)
    }
}

@media (min-width: 992px) {
    .awdf-floor-plans-main {
        display: grid;
        grid-template-columns: 17% 1fr 30%;
        gap: 10px;
        margin: 20px 0;
        position: relative;
        width: 100%;
    }

    .awdf-floor-plans-main .awdf-floor-nav-item {
        font-weight: 600;
        background: #ffffff;
        padding: 5px 8px;
        margin-bottom: 7px;
        cursor: pointer;
        position: relative;
        width: 100%;
        text-align: left;
        border: none;
        border-radius: 0;
        height: 37px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        flex-direction: row;
    }

    .awdf-floor-plans-main .awdf-floor-nav-item button {
        border: none;
        padding: 0;
        margin: 0;
        position: relative;
        width: 100%;
        display: flex;
        text-align: left;
        background: transparent !important;
        color: inherit;
        justify-content: space-between;
        align-items: center;
        flex-direction: row;
        height: 100%;
    }

    .awdf-floor-plans-main .awdf-floor-nav-item.active {
        background: #004f9f;
        color: #ffffff;
    }

    .awdf-floor-navigation {
        position: relative;
        display: block;
    }

    .awdf-floor-plans-main .awdf-floor-nav-item.active:after {
        display: block;
        content: '';
        position: absolute;
        top: 0;
        right: -19px;
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 18.5px 0 18.5px 19px;
        border-color: transparent transparent transparent #004f9f;
        z-index: 1;
        height: 37px;
    }
}

/* Above mobile */
@media (min-width: 769px) {
    .awdf-desktop-only {
        display: inline-flex !important;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .awdf-mobile-only {
        display: inline-flex !important;
    }

    .awdf-floor-plans-main .awdf-floor-navigation .awdf-floor-list {
        display: flex;
    }

    .awdf-floor-plans-main .awdf-floor-navigation .awdf-floor-list .awdf-floor-nav-item {
        border: none !important;
        border-radius: 0;
    }

    .awdf-floor-plans-main .awdf-floor-navigation .awdf-floor-list .awdf-floor-nav-item.active {
        border: none !important;
        border-radius: 0;
    }

    .awdf-floor-plans-main .awdf-floor-navigation .awdf-floor-list .awdf-floor-nav-item .awdf-floor-nav-button {
        padding: 5px 8px;
        margin: 0;
        border: none !important;
        border-radius: 0;
        background-color: #ffffff;
        color: #000000;
        font-weight: bold;
    }

    .awdf-floor-plans-main {
        margin-bottom: 50px;
    }

    .awdf-floor-display {
        min-height: 320px;
    }

    .awdf-floor-plans-main .awdf-floor-navigation .awdf-floor-list .awdf-floor-nav-item.active .awdf-floor-nav-button {
        background-color: #004f9f;
        color: #ffffff;
    }

    .awdf-floor-plans-container {
        padding: 0 15px;
    }

    .awdf-legend-items {
        flex-direction: column;
        gap: 10px;
    }

    .awdf-legend-item {
        min-width: auto;
    }

    .awdf-floor-plans-main {
        gap: 15px;
    }

    .awdf-svg-container {
        padding: 10px;
    }
}

@media (max-width: 480px) {

    .awdf-floor-nav-button {
        padding: 10px 12px;
        font-size: 13px;
    }

    .awdf-svg-container svg {
        max-height: 300px;
    }
}