/* SMS Settings Modal Styles */
#hezarfen-sms-rule-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
}

.sms-rule-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sms-rule-modal-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.sms-rule-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e1e5e9;
}

.sms-rule-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.sms-rule-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #64748b;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.sms-rule-modal-close:hover {
    background-color: #f1f5f9;
    color: #1e293b;
}

.sms-rule-modal-body {
    padding: 24px;
}

.rule-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.rule-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.rule-section h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.rule-section label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
}

.rule-section select,
.rule-section textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}

.rule-section select:focus,
.rule-section textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.rule-section textarea {
    resize: vertical;
    min-height: 80px;
}

.rule-section .description {
    font-size: 13px;
    color: #6b7280;
    margin-top: -8px;
    margin-bottom: 12px;
}

.rule-section input[type="radio"] {
    margin-right: 8px;
}

.rule-section label input[type="radio"] {
    display: inline;
    width: auto;
    margin-bottom: 0;
}

.sms-rule-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e1e5e9;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.sms-rule-modal-footer .button {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.sms-rule-modal-footer .button-primary {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

.sms-rule-modal-footer .button-primary:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

/* SMS Rules List Styles */
.sms-rule-item {
    background: #f9fafb;
    transition: all 0.2s;
}

.sms-rule-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db !important;
}

.sms-rule-item .button-small {
    font-size: 12px;
    padding: 4px 8px;
    margin-right: 8px;
}

.sms-rule-item .delete-sms-rule {
    color: #dc2626;
}

.sms-rule-item .delete-sms-rule:hover {
    background-color: #fef2f2;
    border-color: #fecaca;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sms-rule-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .sms-rule-modal-header,
    .sms-rule-modal-body,
    .sms-rule-modal-footer {
        padding: 16px;
    }
    
    .sms-rule-modal-footer {
        flex-direction: column;
    }
    
    .sms-rule-modal-footer .button {
        width: 100%;
        justify-content: center;
    }
}

/* SMS Variables Styles */
.sms-variables-wrapper {
	margin-top: 10px;
}

.sms-variable-group {
	margin-bottom: 15px;
}

.sms-variable-group-title {
	cursor: pointer;
	margin: 10px 0 5px 0;
	padding: 8px;
	background: #f0f0f1;
	border-left: 4px solid #0073aa;
	display: flex;
	align-items: center;
	transition: background-color 0.2s ease;
	user-select: none;
}

.sms-variable-group-title:hover {
	background: #e8e8e9;
}

.sms-variable-group-title .dashicons {
	margin-right: 5px;
	transition: transform 0.2s ease;
}

.sms-variable-group-content {
	padding: 10px;
	background: #fff;
	border: 1px solid #ddd;
	margin-bottom: 10px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.sms-variable {
	font-family: 'Courier New', monospace;
	font-size: 12px;
	padding: 4px 8px !important;
	height: auto !important;
	line-height: 1.2 !important;
	border: 1px solid #ddd;
	background: #f9f9f9;
	color: #333;
	cursor: pointer;
	transition: all 0.2s ease;
	border-radius: 3px;
	white-space: nowrap;
}

.sms-variable:hover {
	background: #e0e0e0;
	border-color: #999;
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sms-variable:active,
.sms-variable.button-primary {
	background: #0073aa;
	color: white;
	border-color: #0073aa;
}

.sms-variable:focus {
	box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.3);
	outline: none;
}

/* Mobile responsive for variables */
@media (max-width: 768px) {
	.sms-variable-group-content {
		gap: 6px;
	}
	
	.sms-variable {
		font-size: 11px;
		padding: 3px 6px !important;
	}
	
	.sms-variable-group-title {
		padding: 6px;
		font-size: 14px;
	}
}