/**
 * JNS Gift Cards - Estilos del formulario
 */

/* Contenedor principal */
.jns-gift-cards-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.jns-gc-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    color: #333;
}

/* Secciones */
.jns-gc-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.jns-gc-section:last-of-type {
    border-bottom: none;
}

.jns-gc-section-title {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
}

/* Grid de disenos */
.jns-gc-designs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

@media (max-width: 768px) {
    .jns-gc-designs {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .jns-gc-designs {
        grid-template-columns: repeat(2, 1fr);
    }
}

.jns-gc-design-item {
    position: relative;
    cursor: pointer;
}

.jns-gc-design-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.jns-gc-design-item label {
    display: block;
    position: relative;
    border: 3px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.jns-gc-design-item label:hover {
    border-color: #ccc;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.jns-gc-design-item label img {
    width: 100%;
    height: auto;
    display: block;
}

.jns-gc-design-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: #4CAF50;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
}

.jns-gc-design-radio:checked + label {
    border-color: #4CAF50;
}

.jns-gc-design-radio:checked + label .jns-gc-design-check {
    display: flex;
}

/* Grid de montos */
.jns-gc-amounts {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

@media (max-width: 768px) {
    .jns-gc-amounts {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .jns-gc-amounts {
        grid-template-columns: repeat(2, 1fr);
    }
}

.jns-gc-amount-item {
    position: relative;
}

.jns-gc-amount-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.jns-gc-amount-item label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.jns-gc-amount-item label:hover {
    border-color: #999;
    background: #f9f9f9;
}

.jns-gc-amount-radio:checked + label {
    border-color: #4CAF50;
    background: #E8F5E9;
    color: #2E7D32;
}

/* Campos del formulario */
.jns-gc-fields {
    max-width: 700px;
}

.jns-gc-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .jns-gc-field-row {
        grid-template-columns: 1fr;
    }
}

.jns-gc-field {
    margin-bottom: 15px;
}

.jns-gc-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.jns-gc-field label .required {
    color: #e53935;
}

.jns-gc-field input,
.jns-gc-field textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.jns-gc-field input:focus,
.jns-gc-field textarea:focus {
    outline: none;
    border-color: #4CAF50;
}

.jns-gc-field textarea {
    resize: vertical;
    min-height: 100px;
}

/* Vista previa */
.jns-gc-preview {
    background: #f9f9f9;
    border-radius: 15px;
    padding: 30px;
}

.jns-gc-preview-card {
    max-width: 500px;
    margin: 0 auto 20px;
}

.jns-gc-preview-inner {
    background-color: #0c0014;
    background-size: cover;
    background-position: center;
    border-radius: 15px;
    padding: 30px;
    min-height: 250px;
    position: relative;
    color: white;
}

.jns-gc-preview-amount {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 10px 40px;
    border-radius: 10px;
}

.jns-gc-preview-amount span {
    font-size: 28px;
    font-weight: bold;
    color: #333;
}

.jns-gc-preview-from,
.jns-gc-preview-to {
    position: absolute;
    left: 20%;
    color: rgba(255, 255, 255, 0.9);
}

.jns-gc-preview-from {
    bottom: 60px;
}

.jns-gc-preview-to {
    bottom: 30px;
}

.jns-gc-preview-from .label,
.jns-gc-preview-to .label {
    font-size: 14px;
    margin-right: 10px;
}

.jns-gc-preview-from .value,
.jns-gc-preview-to .value {
    font-size: 16px;
}

.jns-gc-preview-message {
    text-align: center;
    margin-top: 20px;
}

.jns-gc-preview-message h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.jns-gc-preview-message p {
    color: #666;
    font-style: italic;
}

/* Boton de envio */
.jns-gc-submit-section {
    text-align: center;
    padding: 20px 0;
}

.jns-gc-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 50px;
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.jns-gc-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.jns-gc-submit-btn:active {
    transform: translateY(0);
}

.jns-gc-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.jns-gc-submit-btn .btn-loader {
    display: flex;
    align-items: center;
    gap: 10px;
}

.jns-gc-submit-btn .spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Legal */
.jns-gc-legal {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 25px;
    margin-top: 30px;
}

.jns-gc-legal h4 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}

.jns-gc-legal ul {
    margin: 0;
    padding-left: 20px;
}

.jns-gc-legal li {
    color: #666;
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 600px) {
    .jns-gift-cards-container {
        padding: 15px;
    }

    .jns-gc-title {
        font-size: 24px;
    }

    .jns-gc-section-title {
        font-size: 18px;
    }

    .jns-gc-preview {
        padding: 20px;
    }

    .jns-gc-preview-inner {
        min-height: 200px;
        padding: 20px;
    }

    .jns-gc-preview-amount span {
        font-size: 22px;
    }

    .jns-gc-submit-btn {
        width: 100%;
        padding: 15px 30px;
    }
}
