Как перенести css ошибки (style) в .css конкретно стили вызывать с файла .css
} elseif($response == '{"error":"Invalid API key"}'){
$obj = json_decode($response);
$work=$obj->{'error'};
$style = "<style>.output {
margin-left: 4%;
display: inline-block;
width: 120px;
height: 30px;
padding-top: 13px;
padding-left: 23px;
text-decoration: none !important;
color: #ffffff !important;
background-color: #bc4749 !important;
border-radius: 35px !important;
border: 0px solid #6a994e !important;
white-space: nowrap;
}</style>";
}
elseif($response == 'Err'){
$work="Error";
$style = "<style>.output {
margin-left: 6.4%;
display: inline-block;
width: 60px;
height: 30px;
padding-top: 13px;
padding-left: 23px;
text-decoration: none !important;
color: #ffffff !important;
background-color: #bc4749 !important;
border-radius: 35px !important;
border: 0px solid #6a994e !important;
white-space: nowrap;
}</style>";
}
else{
$work = $response;
$style = "<style>.output {
margin-left: 4%;
display: inline-block;
width: 120px;
height: 30px;
padding-top: 13px;
padding-left: 23px;
text-decoration: none !important;
color: #ffffff !important;
background-color: #bc4749 !important;
border-radius: 35px !important;
border: 0px solid #6a994e !important;
white-space: nowrap;
}</style>";
}