/* cookie-banner.css */

.cookie-generator-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.settings-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.code-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mt-4 {
    margin-top: 20px;
}

.color-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.color-input-label {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.color-input-label input[type="color"] {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
    padding: 0;
}

.color-input-label input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-input-label input[type="color"]::-webkit-color-swatch {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

textarea.url-input {
    resize: vertical;
    padding: 15px;
    min-height: 80px;
    background: transparent;
    color: #fff;
    width: 100%;
}

.small-info {
    font-size: 13px;
    opacity: 0.7;
    margin-bottom: 15px;
}

.code-result-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: rgba(16, 21, 35, 0.5);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    height: 100%;
}

#result-code {
    width: 100%;
    height: 100%;
    min-height: 250px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    color: #a9b5c7;
    font-family: monospace;
    font-size: 12px;
    resize: vertical;
    outline: none;
}

.copy-button {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.copy-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Preview Section */
.preview-section {
    margin-top: 40px;
}

.preview-container {
    background: url('data:image/svg+xml;utf8,<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><rect width="20" height="20" fill="none"/><circle cx="2" cy="2" r="1.5" fill="%23ffffff" fill-opacity="0.1"/></svg>');
    background-color: #1a1e29;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    min-height: 300px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Preview Banner Initial Default Styles */
.preview-banner {
    background-color: #ffffff;
    color: #161c28;
    padding: 15px 25px;
    font-family: inherit;
    font-size: 14px;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    transition: all 0.3s ease;

    /* Default position: bottom */
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
}

.preview-banner.pos-top {
    bottom: auto;
    top: 0;
    left: 0;
    width: 100%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.preview-banner.pos-bottom-left {
    bottom: 20px;
    left: 20px;
    width: auto;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.preview-banner.pos-bottom-right {
    bottom: 20px;
    left: auto;
    right: 20px;
    width: auto;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.preview-banner-content {
    flex: 1;
    min-width: 100px;
}

.preview-banner a {
    color: inherit;
    text-decoration: underline;
    opacity: 0.8;
}

.preview-banner a:hover {
    opacity: 1;
}

.preview-banner button {
    background-color: #3ea954;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.preview-banner button:hover {
    opacity: 0.9;
}

.text-size-label {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.size-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.size-input-wrapper input[type="number"] {
    background: transparent;
    border: none;
    color: white;
    width: 32px;
    font-size: 14px;
    outline: none;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}

.size-input-wrapper input[type="number"]::-webkit-inner-spin-button,
.size-input-wrapper input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.size-unit {
    font-size: 13px;
    opacity: 0.7;
}

.size-btn {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s, border-color 0.2s;
    font-size: 16px;
    line-height: 1;
}

.size-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.size-btn:active {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 991px) {
    .cookie-generator-form {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 767px) {
    .color-settings-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .code-result-wrapper {
        padding: 12px;
    }

    .preview-container {
        padding: 12px;
        min-height: 200px;
    }

    .preview-banner {
        padding: 12px 15px;
    }

    textarea.url-input {
        padding: 12px;
        min-height: 60px;
    }
}