/* =============================================================================
   DS1 Music Download — Estilos
   Paleta: terroso (#efe6d6 / #f7f1e6 / #8b6f47 / #3e2f1b)
   ============================================================================= */

/* --------------------------------------------------------------------------
   Seção de Músicas (template-part)
   -------------------------------------------------------------------------- */

.dsmd-musicas {
    padding: 80px 24px;
    background: var(--bg);
}

.dsmd-musicas__container {
    max-width: 1100px;
    margin: 0 auto;
}

.dsmd-musicas__header {
    text-align: left;
    margin-bottom: 48px;
}

/* Grid de cards */
.dsmd-musicas__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
}

/* --------------------------------------------------------------------------
   Card de Música
   -------------------------------------------------------------------------- */

.dsmd-music-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(62, 47, 27, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.dsmd-music-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(62, 47, 27, 0.14);
}

.dsmd-music-card__cover {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #efe6d6;
}

.dsmd-music-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dsmd-music-card__cover-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #efe6d6, #d4c4a8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #8b6f47;
}

.dsmd-music-card__info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.dsmd-music-card__type {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8b6f47;
}

.dsmd-music-card__title {
    font-size: 15px;
    font-weight: 700;
    color: #3e2f1b;
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

.dsmd-music-card__btn {
    margin-top: 12px;
    width: 100%;
    padding: 10px;
    background: #3e2f1b;
    color: #f7f1e6;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    letter-spacing: 0.3px;
}

.dsmd-music-card__btn:hover {
    background: #8b6f47;
}

/* --------------------------------------------------------------------------
   Modal Overlay
   -------------------------------------------------------------------------- */

.dsmd-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(30, 20, 10, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.dsmd-modal-overlay.active {
    display: flex;
}

/* --------------------------------------------------------------------------
   Modal Box
   -------------------------------------------------------------------------- */

.dsmd-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 36px 32px;
    position: relative;
    box-shadow: 0 20px 60px rgba(30, 20, 10, 0.25);
    animation: ds1FadeIn 0.2s ease;
}

@keyframes ds1FadeIn {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.dsmd-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1;
    transition: color 0.15s;
}

.dsmd-modal__close:hover {
    color: #3e2f1b;
}

/* Steps indicator */
.dsmd-modal__steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 28px;
}

.dsmd-step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    background: #efe6d6;
    color: #8b6f47;
    transition: background 0.2s, color 0.2s;
}

.dsmd-step--active {
    background: #3e2f1b;
    color: #f7f1e6;
}

.dsmd-step--completed {
    background: #8b6f47;
    color: #fff;
}

.dsmd-step-line {
    flex: 1;
    max-width: 48px;
    height: 2px;
    background: #efe6d6;
}

/* Modal content */
.dsmd-modal__heading {
    font-size: 22px;
    font-weight: 700;
    color: #3e2f1b;
    margin: 0 0 8px;
    line-height: 1.3;
}

.dsmd-modal__subtext {
    font-size: 14px;
    color: #6b5740;
    margin: 0 0 20px;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Form (Step 1)
   -------------------------------------------------------------------------- */

.dsmd-field {
    margin-bottom: 12px;
}

.dsmd-field input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #ddd0c0;
    border-radius: 8px;
    font-size: 15px;
    color: #3e2f1b;
    background: #fafaf8;
    transition: border-color 0.2s;
    box-sizing: border-box;
    outline: none;
}

.dsmd-field input:focus {
    border-color: #8b6f47;
    background: #fff;
}

.dsmd-field input::placeholder {
    color: #b0a090;
}

.dsmd-field select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #ddd0c0;
    border-radius: 8px;
    font-size: 15px;
    color: #3e2f1b;
    background: #fafaf8;
    transition: border-color 0.2s;
    box-sizing: border-box;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238b6f47' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.dsmd-field select:focus {
    border-color: #8b6f47;
    background-color: #fff;
}

.dsmd-field select option[value=""] {
    color: #b0a090;
}

.dsmd-field input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: #f0ece5;
}

.dsmd-field--autocomplete {
    position: relative;
}

.dsmd-city-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid #8b6f47;
    border-radius: 8px;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    z-index: 9999;
    box-shadow: 0 4px 16px rgba(62, 47, 27, 0.12);
    max-height: 220px;
    overflow-y: auto;
}

.dsmd-city-dropdown.open {
    display: block;
}

.dsmd-city-dropdown li {
    padding: 10px 14px;
    font-size: 14px;
    color: #3e2f1b;
    cursor: pointer;
    transition: background 0.1s;
}

.dsmd-city-dropdown li:hover,
.dsmd-city-dropdown li.active {
    background: #f7f1e6;
    color: #3e2f1b;
}

.dsmd-optin {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    cursor: pointer;
}

.dsmd-optin input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #8b6f47;
    cursor: pointer;
}

.dsmd-optin span {
    font-size: 13px;
    color: #6b5740;
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Contribution amounts (Step 2)
   -------------------------------------------------------------------------- */

.dsmd-amount-presets {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.dsmd-amount-btn {
    flex: 1;
    min-width: 60px;
    padding: 10px 8px;
    border: 2px solid #ddd0c0;
    border-radius: 8px;
    background: #fafaf8;
    font-size: 14px;
    font-weight: 600;
    color: #6b5740;
    cursor: pointer;
    transition: all 0.15s;
}

.dsmd-amount-btn:hover,
.dsmd-amount-btn.active {
    border-color: #8b6f47;
    background: #f7f1e6;
    color: #3e2f1b;
}

.dsmd-amount-btn--suggested {
    border-color: #8b6f47;
    background: #f7f1e6;
    color: #3e2f1b;
}

.dsmd-amount-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.dsmd-amount-prefix {
    font-size: 15px;
    font-weight: 600;
    color: #8b6f47;
    flex-shrink: 0;
}

.dsmd-amount-custom input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid #ddd0c0;
    border-radius: 8px;
    font-size: 15px;
    color: #3e2f1b;
    background: #fafaf8;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.dsmd-amount-custom input:focus {
    border-color: #8b6f47;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.dsmd-btn-primary {
    display: block;
    width: 100%;
    padding: 14px;
    background: #3e2f1b;
    color: #f7f1e6;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: 0.2px;
}

.dsmd-btn-primary:hover:not(:disabled) {
    background: #8b6f47;
}

.dsmd-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.dsmd-btn-ghost {
    display: block;
    width: 100%;
    padding: 12px;
    background: none;
    color: #8b6f47;
    border: 1.5px solid #ddd0c0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.dsmd-btn-ghost:hover:not(:disabled) {
    border-color: #8b6f47;
    color: #3e2f1b;
    background: #f7f1e6;
}

.dsmd-arrow {
    display: inline-block;
    transition: transform 0.2s;
}

.dsmd-btn-primary:hover .dsmd-arrow {
    transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   Error message
   -------------------------------------------------------------------------- */

.dsmd-error {
    font-size: 13px;
    color: #c0392b;
    margin: -8px 0 12px;
    min-height: 0;
    line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Success (Step 3)
   -------------------------------------------------------------------------- */

.dsmd-modal__content#dsmdStep3 {
    text-align: center;
}

.dsmd-success-icon {
    width: 64px;
    height: 64px;
    background: #3e2f1b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #f7f1e6;
    margin: 0 auto 20px;
}

.dsmd-spam-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 13px;
    color: #5a4200;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: left;
}

/* --------------------------------------------------------------------------
   Responsivo
   -------------------------------------------------------------------------- */

@media (max-width: 600px) {
    .dsmd-musicas {
        padding: 60px 16px;
    }

    .dsmd-musicas__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .dsmd-modal {
        padding: 28px 20px;
        border-radius: 12px;
    }

    .dsmd-amount-presets {
        gap: 8px;
    }
}

@media (max-width: 360px) {
    .dsmd-musicas__grid {
        grid-template-columns: 1fr 1fr;
    }
}
