/* SMS Sending Page Styles */

.send-sms-container {
    padding: 2rem 0;
}

/* SMS Counter Header - New Design */
.sms-counter-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.counter-display {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    color: white;
}

.counter-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.counter-separator {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

.counter-max {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.counter-divider {
    width: 2px;
    height: 1.5rem;
    background: rgba(255, 255, 255, 0.3);
}

.segment-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
}

.segment-display i {
    font-size: 1rem;
    opacity: 0.9;
}

.segment-number {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.segment-text {
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* SMS Progress Bar */
.sms-progress {
    height: 6px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.sms-progress .progress-bar {
    transition: width 0.3s ease, background-color 0.3s ease;
}

/* SMS Encoding Info */
.sms-encoding-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.encoding-badge,
.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 1rem;
}

.encoding-badge i,
.type-badge i {
    font-size: 0.7rem;
}

/* SMS Textarea */
.sms-textarea {
    font-family: var(--font-family-base);
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    min-height: 150px;
}

/* SMS Info Panel */
.sms-info-panel {
    margin-top: 1rem;
}

.sms-info-panel .info-box {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--border-light) 100%);
    border-radius: 0.75rem;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    height: 100%;
}

.sms-info-panel .info-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.sms-info-panel .info-box .info-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.sms-info-panel .info-box .info-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
}

.info-box small {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Encoding Info */
.encoding-info {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background: var(--background-light);
    border-radius: var(--border-radius);
    margin-top: 0.5rem;
}

.encoding-info small {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

/* Alert Styles */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.875rem 1rem;
    border-radius: var(--border-radius);
}

.alert i {
    margin-top: 0.125rem;
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.15);
    border: 1px solid #ffeeba;
    color: var(--warning-color);
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.15);
    border: 1px solid #bee5eb;
    color: var(--info-color);
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.15);
    border: 1px solid #f5c6cb;
    color: var(--danger-color);
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.badge.bg-info {
    background-color: var(--info-color);
}

.badge.bg-success {
    background-color: var(--success-color);
}

.badge.bg-warning {
    background-color: var(--warning-color);
    color: var(--text-dark);
}

/* Progress Bar */
.progress {
    display: flex;
    height: 5px;
    overflow: hidden;
    font-size: 0.75rem;
    background-color: var(--border-light);
    border-radius: 0.25rem;
}

.progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    background-color: var(--primary-color);
    transition: width 0.3s ease, background-color 0.3s ease;
}

.progress-bar.bg-success {
    background-color: var(--success-color) !important;
}

.progress-bar.bg-warning {
    background-color: var(--warning-color) !important;
}

.progress-bar.bg-danger {
    background-color: var(--danger-color) !important;
}

/* Form Label with Badge */
.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Cost Estimation Card */
.cost-estimation-card .cost-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cost-estimation-card .cost-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    background: var(--background-light);
}

.cost-estimation-card .cost-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.cost-estimation-card .cost-value {
    font-weight: 600;
    color: var(--text-primary);
}

.cost-estimation-card .cost-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border-radius: var(--border-radius);
    margin-top: 0.5rem;
}

.cost-estimation-card .cost-total .cost-label {
    color: white;
    font-size: 1rem;
}

.cost-estimation-card .cost-total .cost-value.total {
    color: white;
    font-size: 1.5rem;
}

/* Template Variables */
.template-variables {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--background-light);
    border-radius: var(--border-radius);
}

.template-variables label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.variables-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Template Preview */
.template-preview {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.template-preview label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.template-content {
    padding: 1rem;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    font-family: var(--font-family-base);
    line-height: 1.6;
}

.template-parameters {
    margin: 1rem 0;
}

.template-parameters label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

/* SMS Preview */
.sms-preview {
    display: flex;
    justify-content: flex-end;
    padding: 1rem;
}

.sms-bubble {
    max-width: 80%;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 1.25rem 1.25rem 0.25rem 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
}

.sms-bubble p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.sms-time {
    display: block;
    text-align: right;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Recipients Card */
.recipients-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recipients-card .recipients-actions {
    display: flex;
    gap: 0.5rem;
}

.recipients-list {
    display: grid;
    gap: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.recipient-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
}

.recipient-item:hover {
    background: var(--card-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.recipient-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.recipient-contact {
    font-weight: 500;
    color: var(--text-primary);
}

.recipient-type {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.empty-recipients {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-recipients i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-recipients p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
    /* SMS Counter Header Mobile */
    .sms-counter-header {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem;
        border-radius: 1rem;
    }
    
    .counter-display {
        justify-content: center;
        width: 100%;
    }
    
    .counter-divider {
        width: 100%;
        height: 2px;
        margin: 0;
    }
    
    .segment-display {
        justify-content: center;
        width: 100%;
    }
    
    /* Card Header Mobile */
    .card-header .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }
    
    .card-title {
        width: 100%;
    }
    
    .sms-counter-header {
        width: 100%;
    }
    
    /* SMS Info Panel Mobile */
    .sms-info-panel .row {
        gap: 0.75rem;
    }
    
    .sms-info-panel .col-6 {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .sms-info-panel .info-box {
        padding: 0.75rem 0.5rem;
    }
    
    .sms-info-panel .info-box .info-value {
        font-size: 1.5rem;
    }
    
    .sms-info-panel .info-box .info-label {
        font-size: 0.65rem;
    }
    
    /* Encoding Info Mobile */
    .sms-encoding-info {
        justify-content: center;
    }
    
    /* Cost Estimation Mobile */
    .cost-estimation-card .cost-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    /* SMS Bubble Mobile */
    .sms-bubble {
        max-width: 90%;
    }
    
    /* Recipients Card Mobile */
    .recipients-card .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    /* Extra Small Devices */
    .counter-number {
        font-size: 1.25rem;
    }
    
    .counter-max {
        font-size: 0.875rem;
    }
    
    .segment-number {
        font-size: 1rem;
    }
    
    .segment-text {
        font-size: 0.75rem;
    }
    
    .sms-info-panel .info-box .info-value {
        font-size: 1.25rem;
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    /* Tablet */
    .sms-counter-header {
        padding: 0.625rem 0.875rem;
    }
    
    .counter-number {
        font-size: 1.375rem;
    }
    
    .segment-number {
        font-size: 1.125rem;
    }
}

/* Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert {
    animation: slideIn 0.3s ease;
}
