/* --- Global Reset & Wrapper --- */
html, body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
}

#gdp-preview-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* --- GDP Header Styles --- */
#gdp-header {
    flex-shrink: 0;
    height: 55px;
    background-color: #ffffff;
    color: #333;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    z-index: 1001;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 15px;
}

#gdp-header .gdp-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.gdp-col { display: flex; align-items: center; }
.gdp-col.gdp-left { justify-content: flex-start; flex: 1; }
.gdp-col.gdp-center { justify-content: center; flex: 2; }
.gdp-col.gdp-right { justify-content: flex-end; flex: 1; }

/* Styling for Buttons */
.gdp-back-button, .gdp-buy-button, .gdp-zalo-button {
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
}

.gdp-back-button { color: #555; background-color: transparent; }
.gdp-back-button:hover { background-color: #f0f0f0; }

.gdp-zalo-button { color: #ffffff; margin-right: 15px; background-color: #0068ff;}
.gdp-zalo-button:hover { background-color: #e6f0ff; }

.gdp-buy-button {
    background-color: #007bff;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}
.gdp-buy-button:hover { background-color: #0069d9; transform: translateY(-1px); }

/* Device Switcher Buttons */
.gdp-device-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #f0f2f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin: 0 4px;
    padding: 6px 12px;
    color: #555;
    transition: all 0.2s ease;
}

.gdp-device-btn svg { width: 20px; height: 20px; fill: currentColor; }
.gdp-device-btn span { margin-left: 8px; font-size: 13px; font-weight: 500; }
.gdp-device-btn:hover { background-color: #e9ecef; border-color: #ccc; }
.gdp-device-btn.active { background-color: #007bff; color: #fff; border-color: #007bff; }

/* --- IFRAME Styles --- */
#gdp-content-wrapper {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
}

#gdp-iframe-container {
    width: 100%;
    height: 100%;
    margin: 0 auto;
    transition: width 0.3s ease-in-out;
    box-sizing: border-box;
    padding: 0px; /* Add some padding around the iframe */
    background-color: #f0f2f5;
}

#gdp-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 4px;
}

#gdp-error-message {
    color: #555;
    font-size: 1.2em;
    padding: 5em 2em;
    line-height: 1.6;
    text-align: center;
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    .gdp-zalo-button { display: block; }
}
@media (max-width: 768px) {
    .gdp-device-btn span { display: none; }
    .gdp-back-button, .gdp-buy-button { font-size: 13px; padding: 8px 12px; }
    #gdp-header { padding: 0 10px; }
    .gdp-col.gdp-center { flex: 3;display: none;}
}