/* Components CSS - Dialog, Carousel, and Form Styles */

/* ===== Dialog Base Styles ===== */
dialog {
    border: none;
    border-radius: 0;
    padding: 0;
    max-width: none;
}

dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.9);
}

.dialog-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #000;
}

.dialog-close {
    position: absolute;
    top: 10px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    z-index: 1000;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dialog-close:hover {
    opacity: 0.8;
}

/* ===== Image Dialog ===== */
.image-dialog {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
}

.image-dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.95);
}

.carousel-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.carousel-slide.active {
    display: flex;
    opacity: 1;
    position: relative;
}

.carousel-slide img {
    max-width: 100vw;
    max-height: 85vh;
    object-fit: contain;
}

.carousel-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 100;
}

.carousel-btn {
    background-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    border: 2px solid #fff;
    padding: 10px 15px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
}

.carousel-btn:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.carousel-info {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #666;
}

.carousel-info h2 {
    margin: 0;
    font-size: 1.5rem;
}

.inquire-btn {
    background-color: #1b6ec2;
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 4px;
    margin: 10px 20px;
    transition: background-color 0.3s;
}

.inquire-btn:hover {
    background-color: #1861ac;
}

/* ===== Contact Form Dialog ===== */
.contact-dialog {
    width: 90%;
    max-width: 800px;
    height: auto;
    border-radius: 4px;
    background: #fff;
}

.contact-dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

.contact-dialog .dialog-content {
    background: #fff;
    flex-direction: column;
    padding: 40px;
}

.contact-dialog .dialog-close {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #888;
}

.contact-dialog form {
    width: 100%;
}

.contact-dialog form h2 {
    margin-top: 0;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 5px;
    color: #333;
}

.form-group input,
.form-group textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1b6ec2;
    box-shadow: 0 0 0 3px rgba(27, 110, 194, 0.1);
}

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

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #1b6ec2;
    color: #fff;
}

.btn-primary:hover {
    background-color: #1861ac;
}

.btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* ===== Gallery Button Styles ===== */
.gallery-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 100%;
}

.gallery-button:hover {
    opacity: 0.9;
}

.gallery-button img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== MUD Component Replacements ===== */
.mud-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.mud-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mud-paper {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

.pa-16 {
    padding: 16px;
}

.ma-2 {
    margin: 2px;
}

.mt-16 {
    margin-top: 16px;
}

.px-4 {
    padding-left: 4px;
    padding-right: 4px;
}

.text-center {
    text-align: center;
}

/* Flex layouts */
.row-flex {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
}

.stack-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Typography replacements */
.mud-typography-h1 {
    font-size: 2rem;
    font-weight: 500;
}

.mud-typography-h2 {
    font-size: 1.65rem;
    font-weight: 500;
}

.mud-typography-body1 {
    font-size: 1rem;
    line-height: 1.5;
}

.mud-typography-body2 {
    font-size: 0.875rem;
    line-height: 1.43;
}

.mud-typography-subtitle1 {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.7;
}
