@import './estilos/variables.css';
@import './estilos/modal.css';


/** TABLE OF CONTENTS
------------------------------------------------------------/
1 - Container Promociones
2 - Card Invitación
3 - Cupones locales
------------------------------------------------------------*/
:root {
    --primary-color: #023047;
    --secondary-color: #219EBC;
    --secondary-color2: #CDD6DA;
    --tertiary-color: #8ECAE6;
    --tertiary-color2: #FB8500;
    --bg-color: #f8f9fa;
    --bg-gradient: linear-gradient(180deg, rgba(7, 59, 76, 1) 64%, rgba(24, 77, 94, 1) 77%, rgba(33, 158, 188, 1) 100%);
    --bg-gradient2: linear-gradient(135deg, #023047 0%, #219EBC 100%);
    --bg-gradient3: linear-gradient(135deg, #219EBC 0%, #023047 100%);
    --bg-gradient4: linear-gradient(180deg, rgb(16, 90, 109) 64%, rgba(24, 77, 94, 1) 77%, rgba(7, 59, 76, 1) 100%);
    --border-color-default: #d1d5db; /* gray-300 */
    --panel-background: #f1f3f4;

    --cyan-100: #ccfbf1;
    --cyan-700: #0e7490;
    --red-100: #fee2e2;
    --red-800: #991b1b;
}


.main-content {
    flex: 1;
    padding: 0rem;
    overflow-y: auto;
}

.main-grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1rem;
    background: var(--panel-background);
}

@media (min-width: 1024px) {
    .main-grid-container {
        grid-template-columns: 2fr 1fr;
    }
}

/* MESSAGE STYLES */
.message-success {
    background: none; /* green-600 */
    color: white;
    padding: 0.5rem;
    border-radius: 0.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.message-error {
    background-color: none; /* red-600 */
    color: white;
    padding: 0.5rem;
    border-radius: 0.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

/* COUPONS SECTION */
.coupons-section {
    background-color: white;
    padding: 1.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.coupons-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.coupons-list-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Coupon Card */
.coupon-card {
    position: relative;
    width: 100%;
    border: 3px solid var(--panel-background);
    background-color: white;
    border-radius: 1.5rem;
    display: flex;
    overflow: hidden;
    height: 7.5rem; /* h-30 */
    margin-bottom: 0.6rem;
    
}
/*-------- Estilos efecto cortado -------*/
/* .coupon-card::before,
.coupon-card::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  background-color: rgb(255, 255, 255);
  border-radius: 50%;
  border: 3px solid var(--secondary-color);
  z-index: 30;
}
.coupon-card::before {
  left: -15px;
}
.coupon-card::after {
  right: -15px;
} */

.coupon-image-wrapper {
    background-image: var(--bg-gradient3);
    color: white;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25%;
    position: relative;
}

.coupon-image-wrapper img {
    max-width: 15rem; /* w-60 */
    max-height: 7.5rem; /* h-30 */
    object-fit: contain;
}

.coupon-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 4px;
    background-color: white;
    border-right: 4px dashed var(--panel-background);
    padding-left: 0.4rem;
}

.coupon-info-wrapper {
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    width: 75%;
    padding: 0.4rem 1rem;
}
.info-text{
    display: flex;
    align-items: start;
    justify-content: center;
    flex-direction: column;
}
.info-disponibilidad{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-top: 0.6rem;
}
.coupon-value {
    font-size: 3rem; /* text-5xl */
    font-weight: bold;
    color: white; /* gray-800 */
    line-height: 3rem;
}
.coupon-title {
    font-size: 1.5rem; /* text-5xl */
    font-weight: bold;
    color: #4b5563;
    line-height: 2rem;
}

.coupon-status {
    font-size: 0.75rem; /* text-xs */
    font-weight: 500;
    background-color: var(--cyan-100);
    color: var(--cyan-700);
    padding: 0.25rem 0.5rem;
    border-radius: 9999px; /* rounded-full */
    margin-top: 0.25rem;
    text-align: center;
}
.coupon-status-red {
    font-size: 0.75rem; /* text-xs */
    font-weight: 500;
    background-color: var(--tertiary-color2);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px; /* rounded-full */
    margin-top: 0.25rem;
    text-align: center;
}

@media (min-width: 640px) {
    .coupon-status {
        margin-top: 0;
    }
}

.coupon-description {
    font-size: 0.875rem; /* text-sm */
    font-weight: bold;
    color: #677385; /* gray-700 */
    line-height: 1rem;
    
}

.coupon-validity {
    font-size: 0.75rem; /* text-xs */
    color: #6b7280; /* gray-500 */
    line-height: 1rem;
}

.coupon-amount {
    font-size: 0.875rem; /* text-sm */
    color: #555; /* gray-600 */
    font-weight: 500;
}

/* Empty State Message */
.empty-state-message {
    border: 2px dashed var(--border-color-default);
    border-radius: 0.5rem;
    padding: 3rem;
    text-align: center;
}

.empty-state-icon {
    width: 3rem; /* h-12 w-12 */
    height: 3rem;
    color: #9ca3af; /* gray-400 */
    stroke-width: 1.5;
    margin: 0 auto;
}

.empty-state-text {
    margin-top: 0.5rem;
    font-size: 0.875rem; /* text-sm */
    color: #6b7280; /* gray-500 */
}

/* Coupons List */
.coupons-list-scroll {
    max-height: 380px;
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.coupons-list-scroll::-webkit-scrollbar {
    width: 6px;
    background: transparent;
}

.coupons-list-scroll::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 4px;
}

.coupon-item {
    border: 2px dashed var(--border-color-default);
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 640px) {
    .coupon-item {
        flex-direction: row;
        align-items: center;
    }
}

.item-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.item-validity-text {
    font-size: 0.75rem;
    color: #6b7280;
}

.item-title {
    font-size: 1.125rem;
    font-weight: bold;
    color: var(--primary-color);
}

.item-description {
    font-size: 0.875rem;
    color: #4b5563;
}

.item-action {
    flex-shrink: 0;
}

.coupon-badge {
    font-weight: 600;
    padding: 0.25rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
}

.coupon-badge-redeemed {
    background-color: #e5e7eb;
    color: #4b5563;
}

.coupon-badge-inactive {
    background-color: var(--red-100);
    color: var(--red-800);
}

.coupon-badge-expired {
    background-color: var(--red-100);
    color: var(--red-800);
}

.coupon-action-button {
    color: white;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    background-color: var(--secondary-color);
    transition-property: background-color;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 0.3s;
}

.coupon-action-button:hover {
    background-color: var(--primary-color);
}

/* REDEEM & INVITE CARD */
.redeem-invite-card {
    width: 100%;
    max-width: 20rem;
    margin: 0 auto;
    background: var(--bg-gradient2);
    color: white;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    height: 21.4rem;
}

.tab-buttons-container {
    display: flex;
}

.tab-button {
    width: 50%;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    color: #9ca3af;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 0.3s;
}
/* View Content */
.view-content {
    height: 100%;
    color: white;
    padding: 1.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.view-content.hidden {
    display: none;
}

.view-title {
    font-size: 1.25rem;
    font-weight: bold;
}

.view-subtitle {
    color: var(--tertiary-color);
    margin-top: 0.25rem;
    font-size: 0.875rem;
}

.formulario{
    display: flex;
    flex-flow: column wrap;
}
.formulario .input-wrapper{
    padding: 1rem 0rem;
}
.input-wrapper input {
    font-size: 1.875rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px dashed white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-align: center;
    color: white;
    width: 100%;
    padding: 2rem 0rem;
}

.input-wrapper input:hover{
    background: none;
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px dashed var(--tertiary-color);


}

.input-wrapper input:focus {
    outline: none;
    box-shadow: none;
    background: none;
    border:2px dashed var(--tertiary-color);
}

.input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.action-buttons-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.redeem-button {
    margin-top: 1rem;
    width: 100%;
    background-color: var(--tertiary-color2);
    font-weight: bold;
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-radius: 0.5rem;
    color: white;
    transition-property: opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 0.3s;
}

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

.error-message, .success-message {
    text-align: center;
    padding-top: 0.75rem;
    font-size: 0.875rem;
}

.error-message {
    color: #fca5a5;
}

.success-message {
    color: #bbf7d0;
}

/* INVITE VIEW */
.code-wrapper {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.invitation-code {
    font-size: 1.875rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px dashed white;
    padding: 1rem 1rem;
    border-radius: 0.5rem;
}

.action-buttons-invite {
    flex-direction: row;
}

.copy-button, .share-button {
    font-weight: bold;
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 0.3s;
    flex: 1;
}

.copy-button {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
}

.copy-button:hover {
    background-color: white;
}

.share-button {
    background-color: var(--tertiary-color2);
    color: white;
}

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

.copy-feedback-message {
    padding-top: 0.75rem;
    transition-property: opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 0.3s;
    display: none;
}
.mobile{
    display: none;
}

/* MEDIA QUERIES */
@media (max-width: 640px) {
    .mobile{
        display: block;
    }
    
    .main-grid-container {
        display: flex;
        flex-flow: column wrap;
        padding: 1rem 1rem;
    }
    .coupons-section{
        display: flex;
        justify-content: center;
        flex-direction: column;
        width: 98%; /*Luego cambiar*/
        padding: 1rem;
    }
    .coupons-title{
        text-align: center;
    }
    .coupon-image-wrapper{
        width: 15%;
        display: flex;
        justify-content: start;
        padding: 0rem;
    }
    .coupon-image-wrapper img{
        width: 80px;
    }
    .coupon-card{
        height: 150px;
    }
    .info-text{
        display: flex;
        justify-content: start;
    }
    .coupon-validity{
        padding-top: 0.2rem;
        line-height: 12px;
    }

    .coupon-status {
        margin-top: 0;
    }
    .coupon-item {
        flex-direction: row;
        align-items: center;
    }
    .coupon-value{
        display: none;
    }
    .coupon-description{
        font-size: 0.8rem;
    }

    .info-disponibilidad{
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-direction: row;
        padding: 0.2rem 0rem 0rem 0rem;

    }
    .coupon-info-wrapper{
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 0.3rem 0.2rem;
    }

    .redeem-invite-card{
        height: 420px;
    }

    .message-success {
        background: green; /* green-600 */
        color: white;
        padding: 0.5rem;
        border-radius: 0.5rem;
        text-align: center;
        margin: 0rem;
    }

    .message-error {
        background-color: red; /* red-600 */
        color: white;
        padding: 0.5rem;
        border-radius: 0.5rem;
        text-align: center;
        margin: 0rem;
    }
    
   
}

@media (min-width: 768px) {
    .main-grid-container {
        grid-template-columns: 2fr 1fr;
    }
    

    .coupons-list-scroll {
        max-height: 480px; /* Incrementa la altura para tablets */
    }
}

@media (min-width: 1024px) {
    .main-grid-container {
        grid-template-columns: 2fr 1fr;
    }
}